Skip to contentSkip to conversation

nfsd: remove unnecessary oom message

PATCH In review Zhen Lei 2 participants 2 messages Jun 17, 2021 – Jun 23, 2021

Subsystems (2)
lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

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.

---
 fs/nfsd/filecache.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
fs/nfsd/filecache.c +1 -3
index 7629248fdd53..76d68b2b4ba2 100644
@@ -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
#1 lore raw
Quoted 4 lines · Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove 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
---
 fs/nfsd/filecache.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
fs/nfsd/filecache.c +1 -3
index 7629248fdd53..76d68b2b4ba2 100644
@@ -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