[PATCH] afs/addr_prefs: Remove argc < 0 handle in afs_proc_addr_prefs_write
Hao Ge
gehao at kylinos.cn
Tue Feb 20 03:18:51 PST 2024
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 at kylinos.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
More information about the linux-afs
mailing list