Skip to content

Commit

Permalink
jffs2: Remove unnecessary OOM messages
Browse files Browse the repository at this point in the history
Per call site OOM messages are unnecessary.
k.alloc and v.alloc failures use dump_stack().

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Artem Bityutskiy <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
  • Loading branch information
JoePerches authored and David Woodhouse committed Mar 26, 2012
1 parent 2c4ae27 commit 045ead3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion fs/jffs2/compr_lzo.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ static int __init alloc_workspace(void)
lzo_compress_buf = vmalloc(lzo1x_worst_compress(PAGE_SIZE));

if (!lzo_mem || !lzo_compress_buf) {
printk(KERN_WARNING "Failed to allocate lzo deflate workspace\n");
free_workspace();
return -ENOMEM;
}
Expand Down
6 changes: 2 additions & 4 deletions fs/jffs2/compr_zlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@ static int __init alloc_workspaces(void)
{
def_strm.workspace = vmalloc(zlib_deflate_workspacesize(MAX_WBITS,
MAX_MEM_LEVEL));
if (!def_strm.workspace) {
printk(KERN_WARNING "Failed to allocate %d bytes for deflate workspace\n", zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL));
if (!def_strm.workspace)
return -ENOMEM;
}

D1(printk(KERN_DEBUG "Allocated %d bytes for deflate workspace\n", zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL)));
inf_strm.workspace = vmalloc(zlib_inflate_workspacesize());
if (!inf_strm.workspace) {
printk(KERN_WARNING "Failed to allocate %d bytes for inflate workspace\n", zlib_inflate_workspacesize());
vfree(def_strm.workspace);
return -ENOMEM;
}
Expand Down

0 comments on commit 045ead3

Please sign in to comment.