aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2014-08-20 06:39:17 -0400
committerSteve French <smfrench@gmail.com>2014-08-22 01:20:58 -0400
commit52a36244443eabb594bdb63622ff2dd7a083f0e2 (patch)
treedfe1f1ee9ed9ea8aa02d2ddc176e871f3a42883a
parent787aded65044e4cabefcf7eb7576c2dd6b151468 (diff)
cifs: No need to send SIGKILL to demux_thread during umount
There is no need to explicitly send SIGKILL to cifs_demultiplex_thread as it is calling module_put_and_exit to exit cleanly. socket sk_rcvtimeo is set to 7 HZ so the thread will wake up in 7 seconds and clean itself. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com> Acked-by: Jeff Layton <jlayton@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
-rw-r--r--fs/cifs/connect.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 36ca2045009b..8a9fded7c135 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -837,7 +837,6 @@ cifs_demultiplex_thread(void *p)
837 struct TCP_Server_Info *server = p; 837 struct TCP_Server_Info *server = p;
838 unsigned int pdu_length; 838 unsigned int pdu_length;
839 char *buf = NULL; 839 char *buf = NULL;
840 struct task_struct *task_to_wake = NULL;
841 struct mid_q_entry *mid_entry; 840 struct mid_q_entry *mid_entry;
842 841
843 current->flags |= PF_MEMALLOC; 842 current->flags |= PF_MEMALLOC;
@@ -928,19 +927,7 @@ cifs_demultiplex_thread(void *p)
928 if (server->smallbuf) /* no sense logging a debug message if NULL */ 927 if (server->smallbuf) /* no sense logging a debug message if NULL */
929 cifs_small_buf_release(server->smallbuf); 928 cifs_small_buf_release(server->smallbuf);
930 929
931 task_to_wake = xchg(&server->tsk, NULL);
932 clean_demultiplex_info(server); 930 clean_demultiplex_info(server);
933
934 /* if server->tsk was NULL then wait for a signal before exiting */
935 if (!task_to_wake) {
936 set_current_state(TASK_INTERRUPTIBLE);
937 while (!signal_pending(current)) {
938 schedule();
939 set_current_state(TASK_INTERRUPTIBLE);
940 }
941 set_current_state(TASK_RUNNING);
942 }
943
944 module_put_and_exit(0); 931 module_put_and_exit(0);
945} 932}
946 933
@@ -2063,8 +2050,6 @@ cifs_find_tcp_session(struct smb_vol *vol)
2063static void 2050static void
2064cifs_put_tcp_session(struct TCP_Server_Info *server) 2051cifs_put_tcp_session(struct TCP_Server_Info *server)
2065{ 2052{
2066 struct task_struct *task;
2067
2068 spin_lock(&cifs_tcp_ses_lock); 2053 spin_lock(&cifs_tcp_ses_lock);
2069 if (--server->srv_count > 0) { 2054 if (--server->srv_count > 0) {
2070 spin_unlock(&cifs_tcp_ses_lock); 2055 spin_unlock(&cifs_tcp_ses_lock);
@@ -2088,10 +2073,6 @@ cifs_put_tcp_session(struct TCP_Server_Info *server)
2088 kfree(server->session_key.response); 2073 kfree(server->session_key.response);
2089 server->session_key.response = NULL; 2074 server->session_key.response = NULL;
2090 server->session_key.len = 0; 2075 server->session_key.len = 0;
2091
2092 task = xchg(&server->tsk, NULL);
2093 if (task)
2094 force_sig(SIGKILL, task);
2095} 2076}
2096 2077
2097static struct TCP_Server_Info * 2078static struct TCP_Server_Info *