diff options
author | zhengbin <zhengbin13@huawei.com> | 2019-08-20 10:00:47 -0400 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-09-16 12:43:37 -0400 |
commit | 2617474bfa33ab6c47c515e57dfbe754f8970640 (patch) | |
tree | 65d08b1a2b879ba4adeab596af278cc886b3a4a8 | |
parent | 1efd4fc72e1f1a7313aa66e1c0269f1041eba2ce (diff) |
cifs: remove unused variable
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>
-rw-r--r-- | fs/cifs/file.c | 2 | ||||
-rw-r--r-- | fs/cifs/smb2ops.c | 2 |
2 files changed, 0 insertions, 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) | |||
1695 | struct cifs_tcon *tcon; | 1695 | struct cifs_tcon *tcon; |
1696 | struct cifsInodeInfo *cinode; | 1696 | struct cifsInodeInfo *cinode; |
1697 | struct cifsFileInfo *cfile; | 1697 | struct cifsFileInfo *cfile; |
1698 | __u16 netfid; | ||
1699 | __u32 type; | 1698 | __u32 type; |
1700 | 1699 | ||
1701 | rc = -EACCES; | 1700 | rc = -EACCES; |
@@ -1711,7 +1710,6 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *flock) | |||
1711 | cifs_read_flock(flock, &type, &lock, &unlock, &wait_flag, | 1710 | cifs_read_flock(flock, &type, &lock, &unlock, &wait_flag, |
1712 | tcon->ses->server); | 1711 | tcon->ses->server); |
1713 | cifs_sb = CIFS_FILE_SB(file); | 1712 | cifs_sb = CIFS_FILE_SB(file); |
1714 | netfid = cfile->fid.netfid; | ||
1715 | cinode = CIFS_I(file_inode(file)); | 1713 | cinode = CIFS_I(file_inode(file)); |
1716 | 1714 | ||
1717 | if (cap_unix(tcon->ses) && | 1715 | 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, | |||
2960 | loff_t offset, loff_t len) | 2960 | loff_t offset, loff_t len) |
2961 | { | 2961 | { |
2962 | struct inode *inode; | 2962 | struct inode *inode; |
2963 | struct cifsInodeInfo *cifsi; | ||
2964 | struct cifsFileInfo *cfile = file->private_data; | 2963 | struct cifsFileInfo *cfile = file->private_data; |
2965 | struct file_zero_data_information fsctl_buf; | 2964 | struct file_zero_data_information fsctl_buf; |
2966 | long rc; | 2965 | long rc; |
@@ -2970,7 +2969,6 @@ static long smb3_punch_hole(struct file *file, struct cifs_tcon *tcon, | |||
2970 | xid = get_xid(); | 2969 | xid = get_xid(); |
2971 | 2970 | ||
2972 | inode = d_inode(cfile->dentry); | 2971 | inode = d_inode(cfile->dentry); |
2973 | cifsi = CIFS_I(inode); | ||
2974 | 2972 | ||
2975 | /* Need to make file sparse, if not already, before freeing range. */ | 2973 | /* Need to make file sparse, if not already, before freeing range. */ |
2976 | /* Consider adding equivalent for compressed since it could also work */ | 2974 | /* Consider adding equivalent for compressed since it could also work */ |