diff options
author | Namjae Jeon <linkinjeon@kernel.org> | 2022-02-24 03:03:41 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-04-15 03:56:13 +0200 |
commit | 50f500b7f6335404b18bbffa93e3a905a08d061a (patch) | |
tree | 2b0c2fb9d19cd467acd02ade9bb8ab58e2cd8983 /fs/ksmbd/vfs.c | |
parent | Linux 5.18-rc2 (diff) | |
download | linux-50f500b7f6335404b18bbffa93e3a905a08d061a.tar.xz linux-50f500b7f6335404b18bbffa93e3a905a08d061a.zip |
ksmbd: remove filename in ksmbd_file
If the filename is change by underlying rename the server, fp->filename
and real filename can be different. This patch remove the uses of
fp->filename in ksmbd and replace it with d_path().
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/vfs.c')
-rw-r--r-- | fs/ksmbd/vfs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ksmbd/vfs.c b/fs/ksmbd/vfs.c index 9cebb6ba555b..dcdd07c6efff 100644 --- a/fs/ksmbd/vfs.c +++ b/fs/ksmbd/vfs.c @@ -398,8 +398,7 @@ int ksmbd_vfs_read(struct ksmbd_work *work, struct ksmbd_file *fp, size_t count, nbytes = kernel_read(filp, rbuf, count, pos); if (nbytes < 0) { - pr_err("smb read failed for (%s), err = %zd\n", - fp->filename, nbytes); + pr_err("smb read failed, err = %zd\n", nbytes); return nbytes; } @@ -875,8 +874,7 @@ int ksmbd_vfs_truncate(struct ksmbd_work *work, err = vfs_truncate(&filp->f_path, size); if (err) - pr_err("truncate failed for filename : %s err %d\n", - fp->filename, err); + pr_err("truncate failed, err %d\n", err); return err; } |