quota: remove unnecessary oom message
PATCH 1/1 quota: remove unnecessary oom message
Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- fs/quota/quota_tree.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
fs/quota/quota_tree.c +1 -5
@@ -49,11 +49,7 @@ static int qtree_dqstr_in_blk(struct qtree_mem_dqinfo *info)static char *getdqbuf (size_t size) { -char *buf =kmalloc (size,GFP_NOFS ); -if (!buf) -printk (KERN_WARNING -"VFS: Not enough memory for quota buffers.\n" ); -return buf; +return kmalloc (size,GFP_NOFS ); }static ssize_t read_blk (struct qtree_mem_dqinfo *info,uint blk,char *buf)
Signature · 1 line
2.25.1
Quoted 6 lines · Zhen Lei
Fixes
scripts/checkpatch.plwarning:
WARNING: Possible unnecessary 'out of memory' messageRemove it can help us save a bit of memory.
Signed-off-by Zhen Lei <[email protected]>
I agree the message is pointless. But when doing this, I guess we can just get rid of getdqbuf() altogether and instead call kmalloc() directly in all the places.
Honza
Quoted 21 lines
fs/quota/quota_tree.c +1
-5@@ -49,11 +49,7 @@ static int qtree_dqstr_in_blk(struct qtree_mem_dqinfo *info)static char *getdqbuf (size_t size) { -char *buf =kmalloc (size,GFP_NOFS ); -if (!buf) -printk (KERN_WARNING -"VFS: Not enough memory for quota buffers.\n" ); -return buf; +return kmalloc (size,GFP_NOFS ); }static ssize_t read_blk (struct qtree_mem_dqinfo *info,uint blk,char *buf)Signature · 1 line
2.25.1
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Quoted 11 lines · Jan Kara
Quoted 6 lines · Zhen Lei
Fixes
scripts/checkpatch.plwarning:
WARNING: Possible unnecessary 'out of memory' messageRemove it can help us save a bit of memory.
Signed-off-by Zhen Lei <[email protected]>I agree the message is pointless. But when doing this, I guess we can just get rid of
getdqbuf()altogether and instead callkmalloc()directly in all the places.
OK, I will get rid of it in v2.
Quoted 24 lines
Honza
Quoted 21 lines
fs/quota/quota_tree.c +1
-5@@ -49,11 +49,7 @@ static int qtree_dqstr_in_blk(struct qtree_mem_dqinfo *info)static char *getdqbuf (size_t size) { -char *buf =kmalloc (size,GFP_NOFS ); -if (!buf) -printk (KERN_WARNING -"VFS: Not enough memory for quota buffers.\n" ); -return buf; +return kmalloc (size,GFP_NOFS ); }static ssize_t read_blk (struct qtree_mem_dqinfo *info,uint blk,char *buf)Signature · 1 line
2.25.1