From: zhengbin <zhengbin13@huawei.com>
Date: Tue, 20 Aug 2019 22:00:47 +0800
Subject: [PATCH] cifs: remove unused variable
Git-commit: 2617474bfa33ab6c47c515e57dfbe754f8970640
References: bsc#1144333
Patch-mainline: v5.4-rc1
In smb3_punch_hole, variable cifsi set but not used, remove it.
In cifs_lock, variable netfid set but not used, remove it.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Acked-by: Paulo Alcantara <palcantara@suse.de>
---
fs/cifs/file.c | 2 --
fs/cifs/smb2ops.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 97090693d182..ab07ae882e62 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1695,7 +1695,6 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *flock)
struct cifs_tcon *tcon;
struct cifsInodeInfo *cinode;
struct cifsFileInfo *cfile;
- __u16 netfid;
__u32 type;
rc = -EACCES;
@@ -1711,7 +1710,6 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *flock)
cifs_read_flock(flock, &type, &lock, &unlock, &wait_flag,
tcon->ses->server);
cifs_sb = CIFS_FILE_SB(file);
- netfid = cfile->fid.netfid;
cinode = CIFS_I(file_inode(file));
if (cap_unix(tcon->ses) &&
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 461a68fdff1f..070d0b7b21dc 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -2960,7 +2960,6 @@ static long smb3_punch_hole(struct file *file, struct cifs_tcon *tcon,
loff_t offset, loff_t len)
{
struct inode *inode;
- struct cifsInodeInfo *cifsi;
struct cifsFileInfo *cfile = file->private_data;
struct file_zero_data_information fsctl_buf;
long rc;
@@ -2970,7 +2969,6 @@ static long smb3_punch_hole(struct file *file, struct cifs_tcon *tcon,
xid = get_xid();
inode = d_inode(cfile->dentry);
- cifsi = CIFS_I(inode);
/* Need to make file sparse, if not already, before freeing range. */
/* Consider adding equivalent for compressed since it could also work */
--
2.25.1