nfsd: remove unnecessary oom message
Subsystems (2)
PATCH 1/1 nfsd: 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.
Signed-off-by Zhen Lei <[email protected]>
--- fs/nfsd/filecache.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
fs/nfsd/filecache.c +1 -3
@@ -643,10 +643,8 @@ nfsd_file_cache_init(void) nfsd_file_hashtbl =kcalloc (NFSD_FILE_HASH_SIZE ,sizeof (*nfsd_file_hashtbl),GFP_KERNEL ); -if (!nfsd_file_hashtbl) { -pr_err ("nfsd: unable to allocate nfsd_file_hashtbl\n" ); +if (!nfsd_file_hashtbl) goto out_err; - } nfsd_file_slab =kmem_cache_create ("nfsd_file" ,sizeof (struct nfsd_file ),0 ,0 ,NULL );
Signature · 1 line
2.25.1
Quoted 4 lines · Zhen Lei
Fixes
scripts/checkpatch.plwarning:
WARNING: Possible unnecessary 'out of memory' messageRemove it can help us save a bit of memory.
On a quick check, I think the other 6 pr_err()s in here also (pretty unlikely) allocation failures, may as well remove those too?
--b.
Quoted 24 lines
Signed-off-by Zhen Lei <[email protected]>--- fs/nfsd/filecache.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)fs/nfsd/filecache.c +1
-3@@ -643,10 +643,8 @@ nfsd_file_cache_init(void) nfsd_file_hashtbl =kcalloc (NFSD_FILE_HASH_SIZE ,sizeof (*nfsd_file_hashtbl),GFP_KERNEL ); -if (!nfsd_file_hashtbl) { -pr_err ("nfsd: unable to allocate nfsd_file_hashtbl\n" ); +if (!nfsd_file_hashtbl) goto out_err; - } nfsd_file_slab =kmem_cache_create ("nfsd_file" ,sizeof (struct nfsd_file ),0 ,0 ,NULL );Signature · 1 line
2.25.1