diff options
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 03ed8a09581c..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 | ||
@@ -1600,6 +1587,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1600 | tmp_end++; | 1587 | tmp_end++; |
1601 | if (!(tmp_end < end && tmp_end[1] == delim)) { | 1588 | if (!(tmp_end < end && tmp_end[1] == delim)) { |
1602 | /* No it is not. Set the password to NULL */ | 1589 | /* No it is not. Set the password to NULL */ |
1590 | kfree(vol->password); | ||
1603 | vol->password = NULL; | 1591 | vol->password = NULL; |
1604 | break; | 1592 | break; |
1605 | } | 1593 | } |
@@ -1637,6 +1625,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1637 | options = end; | 1625 | options = end; |
1638 | } | 1626 | } |
1639 | 1627 | ||
1628 | kfree(vol->password); | ||
1640 | /* Now build new password string */ | 1629 | /* Now build new password string */ |
1641 | temp_len = strlen(value); | 1630 | temp_len = strlen(value); |
1642 | vol->password = kzalloc(temp_len+1, GFP_KERNEL); | 1631 | vol->password = kzalloc(temp_len+1, GFP_KERNEL); |
@@ -2061,8 +2050,6 @@ cifs_find_tcp_session(struct smb_vol *vol) | |||
2061 | static void | 2050 | static void |
2062 | cifs_put_tcp_session(struct TCP_Server_Info *server) | 2051 | cifs_put_tcp_session(struct TCP_Server_Info *server) |
2063 | { | 2052 | { |
2064 | struct task_struct *task; | ||
2065 | |||
2066 | spin_lock(&cifs_tcp_ses_lock); | 2053 | spin_lock(&cifs_tcp_ses_lock); |
2067 | if (--server->srv_count > 0) { | 2054 | if (--server->srv_count > 0) { |
2068 | spin_unlock(&cifs_tcp_ses_lock); | 2055 | spin_unlock(&cifs_tcp_ses_lock); |
@@ -2086,10 +2073,6 @@ cifs_put_tcp_session(struct TCP_Server_Info *server) | |||
2086 | kfree(server->session_key.response); | 2073 | kfree(server->session_key.response); |
2087 | server->session_key.response = NULL; | 2074 | server->session_key.response = NULL; |
2088 | server->session_key.len = 0; | 2075 | server->session_key.len = 0; |
2089 | |||
2090 | task = xchg(&server->tsk, NULL); | ||
2091 | if (task) | ||
2092 | force_sig(SIGKILL, task); | ||
2093 | } | 2076 | } |
2094 | 2077 | ||
2095 | static struct TCP_Server_Info * | 2078 | static struct TCP_Server_Info * |