summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2025-10-31 01:13:32 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2026-01-13 15:18:07 -0500
commitba33ac100d3feb1efb43b32e63cc0c6430936aa3 (patch)
tree68801487b389066c7c9725c7a07cebbad1a52333
parentedefe6bda719d49384b22c524ef8102ce9c632e9 (diff)
ksmbd_vfs_rename(): vfs_path_parent_lookup() accepts ERR_PTR() as name
no need to check in the caller Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/smb/server/vfs.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/smb/server/vfs.c b/fs/smb/server/vfs.c
index a97226116840..30b65b667b96 100644
--- a/fs/smb/server/vfs.c
+++ b/fs/smb/server/vfs.c
@@ -674,10 +674,6 @@ int ksmbd_vfs_rename(struct ksmbd_work *work, const struct path *old_path,
return -ENOMEM;
to = getname_kernel(newname);
- if (IS_ERR(to)) {
- err = PTR_ERR(to);
- goto revert_fsids;
- }
retry:
err = vfs_path_parent_lookup(to, lookup_flags | LOOKUP_BENEATH,
@@ -737,7 +733,6 @@ out2:
}
out1:
putname(to);
-revert_fsids:
ksmbd_revert_fsids(work);
return err;
}