Skip to content

Commit 6aca91c

Browse files
Dr. David Alan Gilbertsmfrench
authored andcommitted
cifs: Remove unused functions
cifs_ses_find_chan() has been unused since commit f486ef8 ("cifs: use the chans_need_reconnect bitmap for reconnect status") cifs_read_page_from_socket() has been unused since commit d08089f ("cifs: Change the I/O paths to use an iterator rather than a page list") cifs_chan_in_reconnect() has been unused since commit bc96215 ("cifs: avoid race conditions with parallel reconnects") Remove them. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 3dfea29 commit 6aca91c

File tree

3 files changed

+0
-53
lines changed

3 files changed

+0
-53
lines changed

fs/smb/client/cifsproto.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,6 @@ extern int cifs_read_from_socket(struct TCP_Server_Info *server, char *buf,
252252
unsigned int to_read);
253253
extern ssize_t cifs_discard_from_socket(struct TCP_Server_Info *server,
254254
size_t to_read);
255-
extern int cifs_read_page_from_socket(struct TCP_Server_Info *server,
256-
struct page *page,
257-
unsigned int page_offset,
258-
unsigned int to_read);
259255
int cifs_read_iter_from_socket(struct TCP_Server_Info *server,
260256
struct iov_iter *iter,
261257
unsigned int to_read);
@@ -623,8 +619,6 @@ enum securityEnum cifs_select_sectype(struct TCP_Server_Info *,
623619
int cifs_alloc_hash(const char *name, struct shash_desc **sdesc);
624620
void cifs_free_hash(struct shash_desc **sdesc);
625621

626-
struct cifs_chan *
627-
cifs_ses_find_chan(struct cifs_ses *ses, struct TCP_Server_Info *server);
628622
int cifs_try_adding_channels(struct cifs_ses *ses);
629623
bool is_server_using_iface(struct TCP_Server_Info *server,
630624
struct cifs_server_iface *iface);
@@ -640,9 +634,6 @@ cifs_chan_set_in_reconnect(struct cifs_ses *ses,
640634
void
641635
cifs_chan_clear_in_reconnect(struct cifs_ses *ses,
642636
struct TCP_Server_Info *server);
643-
bool
644-
cifs_chan_in_reconnect(struct cifs_ses *ses,
645-
struct TCP_Server_Info *server);
646637
void
647638
cifs_chan_set_need_reconnect(struct cifs_ses *ses,
648639
struct TCP_Server_Info *server);

fs/smb/client/connect.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -794,18 +794,6 @@ cifs_discard_from_socket(struct TCP_Server_Info *server, size_t to_read)
794794
return cifs_readv_from_socket(server, &smb_msg);
795795
}
796796

797-
int
798-
cifs_read_page_from_socket(struct TCP_Server_Info *server, struct page *page,
799-
unsigned int page_offset, unsigned int to_read)
800-
{
801-
struct msghdr smb_msg = {};
802-
struct bio_vec bv;
803-
804-
bvec_set_page(&bv, page, to_read, page_offset);
805-
iov_iter_bvec(&smb_msg.msg_iter, ITER_DEST, &bv, 1, to_read);
806-
return cifs_readv_from_socket(server, &smb_msg);
807-
}
808-
809797
int
810798
cifs_read_iter_from_socket(struct TCP_Server_Info *server, struct iov_iter *iter,
811799
unsigned int to_read)

fs/smb/client/sess.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,6 @@ cifs_chan_clear_in_reconnect(struct cifs_ses *ses,
115115
ses->chans[chan_index].in_reconnect = false;
116116
}
117117

118-
bool
119-
cifs_chan_in_reconnect(struct cifs_ses *ses,
120-
struct TCP_Server_Info *server)
121-
{
122-
unsigned int chan_index = cifs_ses_get_chan_index(ses, server);
123-
124-
if (chan_index == CIFS_INVAL_CHAN_INDEX)
125-
return true; /* err on the safer side */
126-
127-
return CIFS_CHAN_IN_RECONNECT(ses, chan_index);
128-
}
129-
130118
void
131119
cifs_chan_set_need_reconnect(struct cifs_ses *ses,
132120
struct TCP_Server_Info *server)
@@ -487,26 +475,6 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server)
487475
spin_unlock(&ses->chan_lock);
488476
}
489477

490-
/*
491-
* If server is a channel of ses, return the corresponding enclosing
492-
* cifs_chan otherwise return NULL.
493-
*/
494-
struct cifs_chan *
495-
cifs_ses_find_chan(struct cifs_ses *ses, struct TCP_Server_Info *server)
496-
{
497-
int i;
498-
499-
spin_lock(&ses->chan_lock);
500-
for (i = 0; i < ses->chan_count; i++) {
501-
if (ses->chans[i].server == server) {
502-
spin_unlock(&ses->chan_lock);
503-
return &ses->chans[i];
504-
}
505-
}
506-
spin_unlock(&ses->chan_lock);
507-
return NULL;
508-
}
509-
510478
static int
511479
cifs_ses_add_channel(struct cifs_ses *ses,
512480
struct cifs_server_iface *iface)

0 commit comments

Comments
 (0)