Commit 96a34377 authored by Hyunchul Lee's avatar Hyunchul Lee Committed by Steve French
Browse files

cifsd: remove calling d_path in error paths



calling d_path is excessive in error paths.

Signed-off-by: default avatarHyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent d710f37c
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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;
	}