[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240220111851.195483-1-gehao@kylinos.cn>
Date: Tue, 20 Feb 2024 19:18:51 +0800
From: Hao Ge <gehao@...inos.cn>
To: dhowells@...hat.com,
marc.dionne@...istor.com
Cc: linux-afs@...ts.infradead.org,
linux-kernel@...r.kernel.org,
gehao618@....com,
Hao Ge <gehao@...inos.cn>
Subject: [PATCH] afs/addr_prefs: Remove argc < 0 handle in afs_proc_addr_prefs_write
Remove argc < 0 handle in afs_proc_addr_prefs_write,because argc
can only be -EINVAL when argc < 0,This situation should be the
same as argc < 2 to release memory and unlock inode.
Fixes: f94f70d39cc2 ("afs: Provide a way to configure address priorities")
Signed-off-by: Hao Ge <gehao@...inos.cn>
---
fs/afs/addr_prefs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/afs/addr_prefs.c b/fs/afs/addr_prefs.c
index a189ff8a5034..ba391f8558d5 100644
--- a/fs/afs/addr_prefs.c
+++ b/fs/afs/addr_prefs.c
@@ -413,8 +413,6 @@ int afs_proc_addr_prefs_write(struct file *file, char *buf, size_t size)
do {
argc = afs_split_string(&buf, argv, ARRAY_SIZE(argv));
- if (argc < 0)
- return argc;
if (argc < 2)
goto inval;
--
2.25.1
Powered by blists - more mailing lists