diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-08-23 08:15:35 -0400 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-09-16 12:43:37 -0400 |
commit | 31ebdc11340abfdb02b7cdbfcc5531b7f479d58d (patch) | |
tree | 5862884a267279a9ca59d551c2054c958345a600 /fs/cifs | |
parent | df58fae72428be113f041fe55c9605a9088bfb14 (diff) |
cifs: remove set but not used variables
Fixes gcc '-Wunused-but-set-variable' warning:
fs/cifs/file.c: In function cifs_lock:
fs/cifs/file.c:1696:24: warning: variable cinode set but not used [-Wunused-but-set-variable]
fs/cifs/file.c: In function cifs_write:
fs/cifs/file.c:1765:23: warning: variable cifs_sb set but not used [-Wunused-but-set-variable]
fs/cifs/file.c: In function collect_uncached_read_data:
fs/cifs/file.c:3578:20: warning: variable tcon set but not used [-Wunused-but-set-variable]
'cinode' is never used since introduced by
commit 03776f4516bc ("CIFS: Simplify byte range locking code")
'cifs_sb' is not used since commit cb7e9eabb2b5 ("CIFS: Use
multicredits for SMB 2.1/3 writes").
'tcon' is not used since commit d26e2903fc10 ("smb3: fix bytes_read statistics")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/file.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index ab07ae882e62..f16f6d2b5217 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -1693,7 +1693,6 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *flock) | |||
1693 | bool posix_lck = false; | 1693 | bool posix_lck = false; |
1694 | struct cifs_sb_info *cifs_sb; | 1694 | struct cifs_sb_info *cifs_sb; |
1695 | struct cifs_tcon *tcon; | 1695 | struct cifs_tcon *tcon; |
1696 | struct cifsInodeInfo *cinode; | ||
1697 | struct cifsFileInfo *cfile; | 1696 | struct cifsFileInfo *cfile; |
1698 | __u32 type; | 1697 | __u32 type; |
1699 | 1698 | ||
@@ -1710,7 +1709,6 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *flock) | |||
1710 | cifs_read_flock(flock, &type, &lock, &unlock, &wait_flag, | 1709 | cifs_read_flock(flock, &type, &lock, &unlock, &wait_flag, |
1711 | tcon->ses->server); | 1710 | tcon->ses->server); |
1712 | cifs_sb = CIFS_FILE_SB(file); | 1711 | cifs_sb = CIFS_FILE_SB(file); |
1713 | cinode = CIFS_I(file_inode(file)); | ||
1714 | 1712 | ||
1715 | if (cap_unix(tcon->ses) && | 1713 | if (cap_unix(tcon->ses) && |
1716 | (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && | 1714 | (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && |
@@ -1762,7 +1760,6 @@ cifs_write(struct cifsFileInfo *open_file, __u32 pid, const char *write_data, | |||
1762 | int rc = 0; | 1760 | int rc = 0; |
1763 | unsigned int bytes_written = 0; | 1761 | unsigned int bytes_written = 0; |
1764 | unsigned int total_written; | 1762 | unsigned int total_written; |
1765 | struct cifs_sb_info *cifs_sb; | ||
1766 | struct cifs_tcon *tcon; | 1763 | struct cifs_tcon *tcon; |
1767 | struct TCP_Server_Info *server; | 1764 | struct TCP_Server_Info *server; |
1768 | unsigned int xid; | 1765 | unsigned int xid; |
@@ -1770,8 +1767,6 @@ cifs_write(struct cifsFileInfo *open_file, __u32 pid, const char *write_data, | |||
1770 | struct cifsInodeInfo *cifsi = CIFS_I(d_inode(dentry)); | 1767 | struct cifsInodeInfo *cifsi = CIFS_I(d_inode(dentry)); |
1771 | struct cifs_io_parms io_parms; | 1768 | struct cifs_io_parms io_parms; |
1772 | 1769 | ||
1773 | cifs_sb = CIFS_SB(dentry->d_sb); | ||
1774 | |||
1775 | cifs_dbg(FYI, "write %zd bytes to offset %lld of %pd\n", | 1770 | cifs_dbg(FYI, "write %zd bytes to offset %lld of %pd\n", |
1776 | write_size, *offset, dentry); | 1771 | write_size, *offset, dentry); |
1777 | 1772 | ||
@@ -3575,10 +3570,8 @@ collect_uncached_read_data(struct cifs_aio_ctx *ctx) | |||
3575 | struct cifs_readdata *rdata, *tmp; | 3570 | struct cifs_readdata *rdata, *tmp; |
3576 | struct iov_iter *to = &ctx->iter; | 3571 | struct iov_iter *to = &ctx->iter; |
3577 | struct cifs_sb_info *cifs_sb; | 3572 | struct cifs_sb_info *cifs_sb; |
3578 | struct cifs_tcon *tcon; | ||
3579 | int rc; | 3573 | int rc; |
3580 | 3574 | ||
3581 | tcon = tlink_tcon(ctx->cfile->tlink); | ||
3582 | cifs_sb = CIFS_SB(ctx->cfile->dentry->d_sb); | 3575 | cifs_sb = CIFS_SB(ctx->cfile->dentry->d_sb); |
3583 | 3576 | ||
3584 | mutex_lock(&ctx->aio_mutex); | 3577 | mutex_lock(&ctx->aio_mutex); |