summaryrefslogtreecommitdiff
path: root/fs/smb/server/vfs.c
diff options
context:
space:
mode:
authorLu Hongfei <luhongfei@vivo.com>2023-05-31 10:10:43 +0800
committerSteve French <stfrench@microsoft.com>2023-06-26 00:07:04 -0500
commitccb5889af97c03c67a83fcd649602034578c0d61 (patch)
tree24410955cc4552571bff4dff0e2e36e23fb70fcd /fs/smb/server/vfs.c
parentcf5e7f734f445588a30350591360bca2f6bf016f (diff)
ksmbd: Change the return value of ksmbd_vfs_query_maximal_access to void
The return value of ksmbd_vfs_query_maximal_access is meaningless, it is better to modify it to void. Signed-off-by: Lu Hongfei <luhongfei@vivo.com> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/server/vfs.c')
-rw-r--r--fs/smb/server/vfs.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/smb/server/vfs.c b/fs/smb/server/vfs.c
index 26cb0d5ab80a..4f8d4a21511d 100644
--- a/fs/smb/server/vfs.c
+++ b/fs/smb/server/vfs.c
@@ -121,11 +121,9 @@ err_out:
return -ENOENT;
}
-int ksmbd_vfs_query_maximal_access(struct mnt_idmap *idmap,
+void ksmbd_vfs_query_maximal_access(struct mnt_idmap *idmap,
struct dentry *dentry, __le32 *daccess)
{
- int ret = 0;
-
*daccess = cpu_to_le32(FILE_READ_ATTRIBUTES | READ_CONTROL);
if (!inode_permission(idmap, d_inode(dentry), MAY_OPEN | MAY_WRITE))
@@ -142,8 +140,6 @@ int ksmbd_vfs_query_maximal_access(struct mnt_idmap *idmap,
if (!inode_permission(idmap, d_inode(dentry->d_parent), MAY_EXEC | MAY_WRITE))
*daccess |= FILE_DELETE_LE;
-
- return ret;
}
/**