Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

smb: client: Remove an unused function and variable

SMB2_QFS_info() has been unused since 2018's
commit 730928c8f4be ("cifs: update smb2_queryfs() to use compounding")

sign_CIFS_PDUs has been unused since 2009's
commit 2edd6c5b0517 ("[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>

authored by

Dr. David Alan Gilbert and committed by
Steve French
55423e9c 0ff41df1

-69
-1
fs/smb/client/cifsfs.c
··· 70 70 bool enable_negotiate_signing; /* false by default */ 71 71 unsigned int global_secflags = CIFSSEC_DEF; 72 72 /* unsigned int ntlmv2_support = 0; */ 73 - unsigned int sign_CIFS_PDUs = 1; 74 73 75 74 /* 76 75 * Global transaction id (XID) information
-65
fs/smb/client/smb2pdu.c
··· 5917 5917 } 5918 5918 5919 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 - 5984 - int 5985 5920 SMB2_QFS_attr(const unsigned int xid, struct cifs_tcon *tcon, 5986 5921 u64 persistent_fid, u64 volatile_fid, int level) 5987 5922 {
-3
fs/smb/client/smb2proto.h
··· 259 259 __u64 volatile_fid); 260 260 extern int smb2_handle_cancelled_mid(struct mid_q_entry *mid, struct TCP_Server_Info *server); 261 261 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); 265 262 extern int SMB311_posix_qfs_info(const unsigned int xid, struct cifs_tcon *tcon, 266 263 u64 persistent_file_id, u64 volatile_file_id, 267 264 struct kstatfs *FSData);