summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-12-17 21:51:51 -0500
committerSteve French <stfrench@microsoft.com>2018-12-28 11:09:46 -0500
commit29cbfa1b2be2e51785f871351d321896861f2ce8 (patch)
tree38f38603e63fdcc22bcc207730737ffcee669211 /fs
parent34bca9bbe7a81c4b53cacb20e996090ddf371c51 (diff)
cifs: remove set but not used variable 'server'
Fixes gcc '-Wunused-but-set-variable' warning: fs/cifs/smb2pdu.c: In function 'smb311_posix_mkdir': fs/cifs/smb2pdu.c:2040:26: warning: variable 'server' set but not used [-Wunused-but-set-variable] fs/cifs/smb2pdu.c: In function 'build_qfs_info_req': fs/cifs/smb2pdu.c:4067:26: warning: variable 'server' set but not used [-Wunused-but-set-variable] The first 'server' never used since commit bea851b8babe ("smb3: Fix mode on mkdir on smb311 mounts") And the second not used since commit 1fc6ad2f10ad ("cifs: remove header_preamble_size where it is always 0") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/smb2pdu.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 448031898dd4..67ce3399400b 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -1955,7 +1955,6 @@ int smb311_posix_mkdir(const unsigned int xid, struct inode *inode,
1955 struct smb_rqst rqst; 1955 struct smb_rqst rqst;
1956 struct smb2_create_req *req; 1956 struct smb2_create_req *req;
1957 struct smb2_create_rsp *rsp = NULL; 1957 struct smb2_create_rsp *rsp = NULL;
1958 struct TCP_Server_Info *server;
1959 struct cifs_ses *ses = tcon->ses; 1958 struct cifs_ses *ses = tcon->ses;
1960 struct kvec iov[3]; /* make sure at least one for each open context */ 1959 struct kvec iov[3]; /* make sure at least one for each open context */
1961 struct kvec rsp_iov = {NULL, 0}; 1960 struct kvec rsp_iov = {NULL, 0};
@@ -1978,9 +1977,7 @@ int smb311_posix_mkdir(const unsigned int xid, struct inode *inode,
1978 if (!utf16_path) 1977 if (!utf16_path)
1979 return -ENOMEM; 1978 return -ENOMEM;
1980 1979
1981 if (ses && (ses->server)) 1980 if (!ses || !(ses->server)) {
1982 server = ses->server;
1983 else {
1984 rc = -EIO; 1981 rc = -EIO;
1985 goto err_free_path; 1982 goto err_free_path;
1986 } 1983 }
@@ -3982,7 +3979,6 @@ static int
3982build_qfs_info_req(struct kvec *iov, struct cifs_tcon *tcon, int level, 3979build_qfs_info_req(struct kvec *iov, struct cifs_tcon *tcon, int level,
3983 int outbuf_len, u64 persistent_fid, u64 volatile_fid) 3980 int outbuf_len, u64 persistent_fid, u64 volatile_fid)
3984{ 3981{
3985 struct TCP_Server_Info *server;
3986 int rc; 3982 int rc;
3987 struct smb2_query_info_req *req; 3983 struct smb2_query_info_req *req;
3988 unsigned int total_len; 3984 unsigned int total_len;
@@ -3992,8 +3988,6 @@ build_qfs_info_req(struct kvec *iov, struct cifs_tcon *tcon, int level,
3992 if ((tcon->ses == NULL) || (tcon->ses->server == NULL)) 3988 if ((tcon->ses == NULL) || (tcon->ses->server == NULL))
3993 return -EIO; 3989 return -EIO;
3994 3990
3995 server = tcon->ses->server;
3996
3997 rc = smb2_plain_req_init(SMB2_QUERY_INFO, tcon, (void **) &req, 3991 rc = smb2_plain_req_init(SMB2_QUERY_INFO, tcon, (void **) &req,
3998 &total_len); 3992 &total_len);
3999 if (rc) 3993 if (rc)