summaryrefslogtreecommitdiff
path: root/fs/ksmbd/vfs.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2022-08-04 19:51:14 +0300
committerSteve French <stfrench@microsoft.com>2022-10-05 09:15:37 +0300
commitc22180a5e2a9e1426fab01d9e54011ec531b1b52 (patch)
tree0f5f1dd91fca58c1499a67d7184d8bd7c30b29e3 /fs/ksmbd/vfs.c
parent369c1634cc7ae8645a5cba4c7eb874755c2a6a07 (diff)
downloadlinux-c22180a5e2a9e1426fab01d9e54011ec531b1b52.tar.xz
ksmbd: constify struct path
... in particular, there should never be a non-const pointers to any file->f_path. Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/vfs.c')
-rw-r--r--fs/ksmbd/vfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ksmbd/vfs.c b/fs/ksmbd/vfs.c
index 0c04a59cbe60..4fcf96a01c16 100644
--- a/fs/ksmbd/vfs.c
+++ b/fs/ksmbd/vfs.c
@@ -541,7 +541,7 @@ out:
*
* Return: 0 on success, otherwise error
*/
-int ksmbd_vfs_getattr(struct path *path, struct kstat *stat)
+int ksmbd_vfs_getattr(const struct path *path, struct kstat *stat)
{
int err;
@@ -1166,7 +1166,7 @@ static int __caseless_lookup(struct dir_context *ctx, const char *name,
*
* Return: 0 on success, otherwise error
*/
-static int ksmbd_vfs_lookup_in_dir(struct path *dir, char *name, size_t namelen)
+static int ksmbd_vfs_lookup_in_dir(const struct path *dir, char *name, size_t namelen)
{
int ret;
struct file *dfilp;