Messages in this thread Patch in this message | | | From | Zhen Lei <> | Subject | [PATCH 1/1] quota: remove unnecessary oom message | Date | Thu, 17 Jun 2021 17:16:27 +0800 |
| |
Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> --- fs/quota/quota_tree.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/fs/quota/quota_tree.c b/fs/quota/quota_tree.c index c5562c871c8b..b097d02bad94 100644 --- a/fs/quota/quota_tree.c +++ b/fs/quota/quota_tree.c @@ -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) -- 2.25.1
| |