summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2021-06-18 04:18:34 +0300
committerNamjae Jeon <namjae.jeon@samsung.com>2021-06-22 10:11:11 +0300
commitafa8f016c5a527bd004042ea47ca8b8007e4185f (patch)
tree88d8884e46bfd3e391bcf151503fc13278e24922
parentc30f4eb84badf7476824c38f874542a2e653b46b (diff)
downloadlinux-afa8f016c5a527bd004042ea47ca8b8007e4185f.tar.xz
ksmbd: initialize variables on the declaration
Initialize variables on the declaration. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r--fs/cifsd/vfs.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/cifsd/vfs.c b/fs/cifsd/vfs.c
index fb31c1ccb1bd..4e0cf1b95419 100644
--- a/fs/cifsd/vfs.c
+++ b/fs/cifsd/vfs.c
@@ -355,14 +355,11 @@ out:
int ksmbd_vfs_read(struct ksmbd_work *work, struct ksmbd_file *fp, size_t count,
loff_t *pos)
{
- struct file *filp;
+ struct file *filp = fp->filp;
ssize_t nbytes = 0;
- char *rbuf;
- struct inode *inode;
+ char *rbuf = work->aux_payload_buf;
+ struct inode *inode = file_inode(filp);
- rbuf = work->aux_payload_buf;
- filp = fp->filp;
- inode = file_inode(filp);
if (S_ISDIR(inode->i_mode))
return -EISDIR;