From patchwork Wed Aug 20 10:39:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namjae Jeon X-Patchwork-Id: 4748891 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AEB33C0338 for ; Wed, 20 Aug 2014 10:39:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E4E6420155 for ; Wed, 20 Aug 2014 10:39:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 043712014A for ; Wed, 20 Aug 2014 10:39:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752259AbaHTKjT (ORCPT ); Wed, 20 Aug 2014 06:39:19 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:15113 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976AbaHTKjS (ORCPT ); Wed, 20 Aug 2014 06:39:18 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NAL008WZPLH25C0@mailout1.samsung.com> for linux-cifs@vger.kernel.org; Wed, 20 Aug 2014 19:39:17 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.115]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 9F.36.25328.5DA74F35; Wed, 20 Aug 2014 19:39:17 +0900 (KST) X-AuditID: cbfee68d-b7f2f6d0000062f0-9b-53f47ad5ab9e Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id BB.05.04943.5DA74F35; Wed, 20 Aug 2014 19:39:17 +0900 (KST) Received: from DONAMJAEJEO06 ([10.88.104.63]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NAL00HG4PLHKGB0@mmp1.samsung.com>; Wed, 20 Aug 2014 19:39:17 +0900 (KST) From: Namjae Jeon To: 'Steve French' Cc: 'Shirish Pargaonkar' , 'Pavel Shilovsky' , linux-cifs@vger.kernel.org, Ashish Sangwan Subject: [PATCH 3/7] cifs: No need to send SIGKILL to demux_thread during umount Date: Wed, 20 Aug 2014 19:39:17 +0900 Message-id: <003601cfbc62$fe88d170$fb9a7450$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac+8YrwJGu23awnfS4WTpyvSbAIJkw== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBIsWRmVeSWpSXmKPExsWyRsSkWPdq1ZdggxN/NS2WTrzEbPHi/y5m i3N7WS1ezGlgtHjz4jCbA6vHzll32T3m7upj9OjbsorR4/MmuQCWKC6blNSczLLUIn27BK6M +ZPFCu7yV/R17mVrYPzP08XIySEhYCJxpu0aG4QtJnHh3nogm4tDSGApo0T71cuMMEVH/9xl gkgsYpTYe+cClPOXUWLz4Z2sXYwcHGwC2hJ/toiCNIgIqEt8Xv6XGcRmFljBKPHolwlIibBA gMTMx0EgYRYBVYmWI/PYQWxeAUuJ6wuOs0DYghI/Jt9jgWjVkli/8zgThC0vsXnNW2aIexQk dpx9zQixSk/ifvsOqHoRiX0v3jGCnCYhsI1d4sfLi6wQywQkvk0+xAJyg4SArMSmA1BzJCUO rrjBMoFRbBaS1bOQrJ6FZPUsJCsWMLKsYhRNLUguKE5KLzLUK07MLS7NS9dLzs/dxAiMtdP/ nvXuYLx9wPoQYzLQ+onMUqLJ+cBYzSuJNzQ2M7Iw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3fOt dfHmh32vYpUiCrctfvt42Zyy+37RWnllO04aaIUu5Nlb/lHkRPW3bezPk2ySbgcmPp0onGOm xFKckWioxVxUnAgAQWX8UfoCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Ashish Sangwan Acked-by: Jeff Layton --- fs/cifs/connect.c | 19 ------------------- 1 files changed, 0 insertions(+), 19 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 03ed8a0..b4b6d10 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -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; @@ -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); } @@ -2061,8 +2048,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); @@ -2086,10 +2071,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 *