Skip to content

Commit 55423e9

Browse files
Dr. David Alan GilbertSteve French
authored andcommitted
smb: client: Remove an unused function and variable
SMB2_QFS_info() has been unused since 2018's commit 730928c ("cifs: update smb2_queryfs() to use compounding") sign_CIFS_PDUs has been unused since 2009's commit 2edd6c5 ("[CIFS] NTLMSSP support moving into new file, old dead code removed") Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 0ff41df commit 55423e9

File tree

3 files changed

+0
-69
lines changed

3 files changed

+0
-69
lines changed

fs/smb/client/cifsfs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ bool require_gcm_256; /* false by default */
7070
bool enable_negotiate_signing; /* false by default */
7171
unsigned int global_secflags = CIFSSEC_DEF;
7272
/* unsigned int ntlmv2_support = 0; */
73-
unsigned int sign_CIFS_PDUs = 1;
7473

7574
/*
7675
* Global transaction id (XID) information

fs/smb/client/smb2pdu.c

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -5916,71 +5916,6 @@ SMB311_posix_qfs_info(const unsigned int xid, struct cifs_tcon *tcon,
59165916
return rc;
59175917
}
59185918

5919-
int
5920-
SMB2_QFS_info(const unsigned int xid, struct cifs_tcon *tcon,
5921-
u64 persistent_fid, u64 volatile_fid, struct kstatfs *fsdata)
5922-
{
5923-
struct smb_rqst rqst;
5924-
struct smb2_query_info_rsp *rsp = NULL;
5925-
struct kvec iov;
5926-
struct kvec rsp_iov;
5927-
int rc = 0;
5928-
int resp_buftype;
5929-
struct cifs_ses *ses = tcon->ses;
5930-
struct TCP_Server_Info *server;
5931-
struct smb2_fs_full_size_info *info = NULL;
5932-
int flags = 0;
5933-
int retries = 0, cur_sleep = 1;
5934-
5935-
replay_again:
5936-
/* reinitialize for possible replay */
5937-
flags = 0;
5938-
server = cifs_pick_channel(ses);
5939-
5940-
rc = build_qfs_info_req(&iov, tcon, server,
5941-
FS_FULL_SIZE_INFORMATION,
5942-
sizeof(struct smb2_fs_full_size_info),
5943-
persistent_fid, volatile_fid);
5944-
if (rc)
5945-
return rc;
5946-
5947-
if (smb3_encryption_required(tcon))
5948-
flags |= CIFS_TRANSFORM_REQ;
5949-
5950-
memset(&rqst, 0, sizeof(struct smb_rqst));
5951-
rqst.rq_iov = &iov;
5952-
rqst.rq_nvec = 1;
5953-
5954-
if (retries)
5955-
smb2_set_replay(server, &rqst);
5956-
5957-
rc = cifs_send_recv(xid, ses, server,
5958-
&rqst, &resp_buftype, flags, &rsp_iov);
5959-
free_qfs_info_req(&iov);
5960-
if (rc) {
5961-
cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE);
5962-
goto qfsinf_exit;
5963-
}
5964-
rsp = (struct smb2_query_info_rsp *)rsp_iov.iov_base;
5965-
5966-
info = (struct smb2_fs_full_size_info *)(
5967-
le16_to_cpu(rsp->OutputBufferOffset) + (char *)rsp);
5968-
rc = smb2_validate_iov(le16_to_cpu(rsp->OutputBufferOffset),
5969-
le32_to_cpu(rsp->OutputBufferLength), &rsp_iov,
5970-
sizeof(struct smb2_fs_full_size_info));
5971-
if (!rc)
5972-
smb2_copy_fs_info_to_kstatfs(info, fsdata);
5973-
5974-
qfsinf_exit:
5975-
free_rsp_buf(resp_buftype, rsp_iov.iov_base);
5976-
5977-
if (is_replayable_error(rc) &&
5978-
smb2_should_replay(tcon, &retries, &cur_sleep))
5979-
goto replay_again;
5980-
5981-
return rc;
5982-
}
5983-
59845919
int
59855920
SMB2_QFS_attr(const unsigned int xid, struct cifs_tcon *tcon,
59865921
u64 persistent_fid, u64 volatile_fid, int level)

fs/smb/client/smb2proto.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,6 @@ extern int smb2_handle_cancelled_close(struct cifs_tcon *tcon,
259259
__u64 volatile_fid);
260260
extern int smb2_handle_cancelled_mid(struct mid_q_entry *mid, struct TCP_Server_Info *server);
261261
void smb2_cancelled_close_fid(struct work_struct *work);
262-
extern int SMB2_QFS_info(const unsigned int xid, struct cifs_tcon *tcon,
263-
u64 persistent_file_id, u64 volatile_file_id,
264-
struct kstatfs *FSData);
265262
extern int SMB311_posix_qfs_info(const unsigned int xid, struct cifs_tcon *tcon,
266263
u64 persistent_file_id, u64 volatile_file_id,
267264
struct kstatfs *FSData);

0 commit comments

Comments
 (0)