ksmbd: initialize variables on the declaration
authorNamjae Jeon <namjae.jeon@samsung.com>
Fri, 18 Jun 2021 01:18:34 +0000 (10:18 +0900)
committerNamjae Jeon <namjae.jeon@samsung.com>
Tue, 22 Jun 2021 07:11:11 +0000 (16:11 +0900)
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>
fs/cifsd/vfs.c

index fb31c1c..4e0cf1b 100644 (file)
@@ -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;