Skip to content

Commit

Permalink
cifs: No need to send SIGKILL to demux_thread during umount
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ashish Sangwan <[email protected]>
Acked-by: Jeff Layton <[email protected]>
Signed-off-by: Steve French <[email protected]>
  • Loading branch information
namjaejeon authored and smfrench committed Aug 22, 2014
1 parent 787aded commit 52a3624
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,6 @@ cifs_demultiplex_thread(void *p)
struct TCP_Server_Info *server = p;
unsigned int pdu_length;
char *buf = NULL;
struct task_struct *task_to_wake = NULL;
struct mid_q_entry *mid_entry;

current->flags |= PF_MEMALLOC;
Expand Down Expand Up @@ -928,19 +927,7 @@ cifs_demultiplex_thread(void *p)
if (server->smallbuf) /* no sense logging a debug message if NULL */
cifs_small_buf_release(server->smallbuf);

task_to_wake = xchg(&server->tsk, NULL);
clean_demultiplex_info(server);

/* if server->tsk was NULL then wait for a signal before exiting */
if (!task_to_wake) {
set_current_state(TASK_INTERRUPTIBLE);
while (!signal_pending(current)) {
schedule();
set_current_state(TASK_INTERRUPTIBLE);
}
set_current_state(TASK_RUNNING);
}

module_put_and_exit(0);
}

Expand Down Expand Up @@ -2063,8 +2050,6 @@ cifs_find_tcp_session(struct smb_vol *vol)
static void
cifs_put_tcp_session(struct TCP_Server_Info *server)
{
struct task_struct *task;

spin_lock(&cifs_tcp_ses_lock);
if (--server->srv_count > 0) {
spin_unlock(&cifs_tcp_ses_lock);
Expand All @@ -2088,10 +2073,6 @@ cifs_put_tcp_session(struct TCP_Server_Info *server)
kfree(server->session_key.response);
server->session_key.response = NULL;
server->session_key.len = 0;

task = xchg(&server->tsk, NULL);
if (task)
force_sig(SIGKILL, task);
}

static struct TCP_Server_Info *
Expand Down

0 comments on commit 52a3624

Please sign in to comment.