diff options
author | Hyunchul Lee <[email protected]> | 2021-04-01 17:23:21 +0900 |
---|---|---|
committer | Steve French <[email protected]> | 2021-05-10 19:15:32 -0500 |
commit | 96a34377dc5a0969b7b0404fce84159b7c8f89d7 (patch) | |
tree | 9156311e9a8002e00cd316c25032c885aad3d63a | |
parent | d710f37c7bcd7f2cedab4762fff3e11c83aebf3f (diff) |
cifsd: remove calling d_path in error paths
calling d_path is excessive in error paths.
Signed-off-by: Hyunchul Lee <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
Signed-off-by: Steve French <[email protected]>
-rw-r--r-- | fs/cifsd/vfs.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/cifsd/vfs.c b/fs/cifsd/vfs.c index 0ecdb5121c3a..b509c90d911f 100644 --- a/fs/cifsd/vfs.c +++ b/fs/cifsd/vfs.c @@ -312,9 +312,8 @@ int ksmbd_vfs_read(struct ksmbd_work *work, struct ksmbd_file *fp, size_t count, { struct file *filp; ssize_t nbytes = 0; - char *rbuf, *name; + char *rbuf; struct inode *inode; - char namebuf[NAME_MAX]; rbuf = work->aux_payload_buf; filp = fp->filp; @@ -348,11 +347,8 @@ 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) { - name = d_path(&filp->f_path, namebuf, sizeof(namebuf)); - if (IS_ERR(name)) - name = "(error)"; ksmbd_err("smb read failed for (%s), err = %zd\n", - name, nbytes); + fp->filename, nbytes); return nbytes; } |