From patchwork Tue Jul 31 10:25:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10550597 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 59AD215E2 for ; Tue, 31 Jul 2018 10:25:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41F4D2A4B2 for ; Tue, 31 Jul 2018 10:25:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35D322A4C3; Tue, 31 Jul 2018 10:25:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C32572A4B2 for ; Tue, 31 Jul 2018 10:25:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731288AbeGaMFN (ORCPT ); Tue, 31 Jul 2018 08:05:13 -0400 Received: from mail-eopbgr00112.outbound.protection.outlook.com ([40.107.0.112]:25181 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727409AbeGaMFN (ORCPT ); Tue, 31 Jul 2018 08:05:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OXy8/7X0TSXhboCFL2wrXXdxJybxn47IBgvvLdh1hg4=; b=V6Yc02gmDrM2gkkjRxfoUb2eaFtL0vWA9eRNBEZJ8PEgUWyHgMyX7N51VMASzQZYrPv768N9PDclXxXAd282x4x6ar5ydO1DwjIQ794gimVsNQApfw1SZdK1xVSvJDxAKJzJdQWy/l2y0Skjk/Cblg1QN9meddoVAvzV5tzJY8s= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (185.231.240.5) by HE1PR0801MB2028.eurprd08.prod.outlook.com (2603:10a6:3:50::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.21; Tue, 31 Jul 2018 10:25:29 +0000 Subject: [PATCH 1/2] fuse: Use list_first_entry() in flush_bg_queue() From: Kirill Tkhai To: miklos@szeredi.hu, linux-fsdevel@vger.kernel.org, ktkhai@virtuozzo.com Date: Tue, 31 Jul 2018 13:25:25 +0300 Message-ID: <153303272510.387.12118866693274687533.stgit@localhost.localdomain> In-Reply-To: <153303268481.387.10809229593975235816.stgit@localhost.localdomain> References: <153303268481.387.10809229593975235816.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: HE1PR06CA0157.eurprd06.prod.outlook.com (2603:10a6:7:16::44) To HE1PR0801MB2028.eurprd08.prod.outlook.com (2603:10a6:3:50::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 565d69a0-9a2b-4897-4128-08d5f6cff0ad X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:HE1PR0801MB2028; X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB2028;3:hRic+T+T1qNitH5SPDoGPFEnz+aaQ/uSmUOsy3AwpRoNfqiYtOKwYfheq/PUELABCFesujmpgBgpwH8hw2TSZ8aykCOvgXNoDwr34JT/dmL3YZZB55shQV+n3dzCRks2spQsfliDdA8mT1+lrFxaM08+49THfBfoNjDGUG2amXFwNDILuJvnchaHdJGntfE9y4kL14oMPOQMz/zzoq4G9LKIqISHP4Gq8WquLueY+/cmyKmr5U7xwNrlD3f8ZQgQ;25:pZwahXUXDL5PUrAuYodaAgnQxT7rz24gMJr2rnYocQTAOY7r6pIy8fvn4uQLYsCswJxcfVQ63ZiYhislXxdTBkzfZQRq7Do4R0uqMRemLNgl2mRfcYCVYhgBn0QGM07pZeqxexeW1CqQ1JLzcIj7LCF6/gZP5MWFsL6+pEYTSl2BzxgB++6tMpVUbMDGgHMCOUA66oiG4T+cDamRlTZ65XHlG5YgUaUQKwMoz8cvKlo/6EjJQ+36viWPpO7qQnJqzJLQ8y0fy9Wv5pCAYTU6QtSZ2iCCYjd8pCxw08T3M+YMhY1F4UE1CCpL/afoAhAwKiIgESOb4J+N1r1BfiLQFg==;31:NzgFmYZ0LCVbBF588YLKi4Wz6qy/AEmBMQ7Kw1g7MAW4whMbe7WiRBb6vRzEWN190wfaWOowl+m4zMqD1q9wPJIFEPqxbILftabvTOerOdq+fUE/tHVdh2JCxxq91dnCklqZaGiPerjU8w5dYzwWuRgOA4PGFmThmOUY3NAZetEYKd6UqWzgG3MC4yV4paFvDOv+16lTLh8B5QeaHHWd52XzGC+xiNYD2LjKz9serbc= X-MS-TrafficTypeDiagnostic: HE1PR0801MB2028: X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB2028;20:l30YbsohRcSCfpJsvOUaX05W+7JnfI56VwOiPINhL8fB7NjfBFzb55wa8vfJPF4wv+svsf0aLeJ65eBIgonK7zumwknUchGD6UrICCjwifJHd3ZHdPTOTEv9JwVGrnU81Yog0j2TCCc68K78gR2Tor/VsK7kwawjBEXnFXd887OGy3Y3xnRZf8xPUmbiN5+RxMNf372mflAAncRjCW+7jZCkgO5A/aEjd7aOKdbpLqHEIL8qxGLvWdF1mPE4R4vSZpkGUielSlxp49+WVX+Nm3TcJhtcoqv/mw39GBCF3Wrg8A1YUIeGmFmJWUuzMJXERYpRIAqt5qYY/6EKpMYfETwyuCgyI5/f28617TrnicLlS8XwRzvc82d4Gb8xPTshagHDF2FyH1hR+09ggxfYyt4CMF0TqKCgbjsaloOv7wJtqyz3PAgpOTfK6W/jqd9vAlOCRlk4VrDLT173FZCAzesZUFTXgT/bdunaCjQwlRibiE9zXibWUOdZM6DlPMAv;4:6SiO1SyXLOsafXZOkore1dMHjV6eN8H0qBGv7LVn3Uep5nK179xSnca18u7AjNzspCdP+gcGQ8cgpFes4kiJTjX2JNG3M3T68JeUmWNyC2LNaLyaCdC0O8DdVSUePzRWDAPWTQu59dEgUIc9LANAqJ6xwfFiDhgosqmcjqseC+1LbyCgAdEfMRCiYuaESwRYhaDefXVmHz47WhN90fw+B18w+XugVWIrSfUyiVUxHgNQQkn1+0nWlo7REL2fdquL9jkUxL8pEoHikJRRbJlHTQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016);SRVR:HE1PR0801MB2028;BCL:0;PCL:0;RULEID:;SRVR:HE1PR0801MB2028; X-Forefront-PRVS: 0750463DC9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(136003)(366004)(376002)(346002)(396003)(39850400004)(199004)(189003)(76176011)(105586002)(33896004)(81156014)(14444005)(11346002)(97736004)(86362001)(7696005)(106356001)(58126008)(53936002)(2486003)(446003)(52116002)(26005)(25786009)(6506007)(55016002)(8936002)(9686003)(386003)(23676004)(316002)(16526019)(230700001)(186003)(47776003)(305945005)(6666003)(103116003)(66066001)(68736007)(476003)(2906002)(486006)(956004)(478600001)(6116002)(7736002)(5660300001)(3846002)(81166006)(8676002)(61506002)(50466002);DIR:OUT;SFP:1102;SCL:1;SRVR:HE1PR0801MB2028;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BHE1PR0801MB2028=3B23=3A/gJUm?= =?utf-8?q?7QncgxN/kjDfORizYW9auk50uqyCTmzOdcRLgqAxwuhxbv5EM/msdOWNjhO3Mi30B?= =?utf-8?q?nr26lSvWVAKffZlHRgvNg2U/LbBDp1K4wGPB125v+zMWhjb7aNWIhc56FqK0L4/Lb?= =?utf-8?q?gJhUYYCf5Y2hpedbtaUERbEvNq+9BksgdAeCG0NS/tRPC28SDwF7XoBxSf/x/IBjy?= =?utf-8?q?yMDia7Vux1sIeQSpQXPpWijdLRn0GB6V0GQMJKwQOTZqhrgBfwb12N+WsF5F1LfOn?= =?utf-8?q?wdssnAF4fjm7je3Pl0naVTvC8ppWQlHFTDxJCejJ7UrGWIplnd2E5uTutY2J1dUTG?= =?utf-8?q?6JYfJTtD58YwTDtKbV2pXC4GNdiy3ZaqhRK5beQTixWn1/u8eA59gUGYQ7+4MgNNl?= =?utf-8?q?6WcMgVENe2TnRwWfgTrGIn9KtvFUy1KFoXCe2M6ZNcU8Svuc2NDUdLe5GxdQp3blb?= =?utf-8?q?HK1EI7g0zDmXK0vnGWa6+HTMh7XFQBJFoMGNIemj6LkjrDqhHo61hOMuEQ9FY0bGq?= =?utf-8?q?LuTBdDkR7w9PKZ76FKAKIoPDRyJAIYxxx0XUOaEsDMrz0hwzWxbZASlMNvzzYRp7v?= =?utf-8?q?lNfcrziDJxxl2nphV2nMOoKmvDqtXQYHPGQ1Z9qaRDZ9b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MCLs84= X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB2028;6:BDIKKznmD2P6Qd5TN0VSQkDper8ycUDv1VcciRDjoxUo3cHZTjfhX6IvzgcZFYa4yhKVdkUi5ejcdpfEt0pWlMbt5OuVANg6cK3ou25PC1+vsR/yyQ3x+1U/t6DOMA715MPb26UWaE2xcQbzfqVblor4Cj5VRPQIEoOCBA96ic+lESnzNQ7lIY9eJWJ3nPrNrRXay4PnocmpykEMUoVYCDgXeT2CxkY1o9QeQYE+fB/GJI5BfDMbr4SFVwP8KaZjsslIwxAqc2HR/DAsAmVkpMP8MLSgBIp24JHdSIZNlHs0v3De9HDXPj7aJc6sRDrnlCE9ZgD6Z7Q1AEuytxCrH6T8ujBCoi8Lqn886M/b0hzpd6P7LaUR02V/NA5ng81XbFHjg7/mE9qOEAQnnvN4z8vUled/ZC9ojzBmGXwpdDbDpnFxN1xANn2h89g7oE3WiSC6r8tU+M8YBA4oMYhsIg==;5:vJtcaCFhcsb1GnWSeP9vYNSIFMZH907klBKE6SvFzPyJuWX3PP3kbfcpMNpG69GcSYMdtalK+i8Ct9M69LIH+bE2+cDLesA8ycgvyXZsRn0n0nRjJ/BOG+T/jsDxsswxrzpsBqQ6D3A3tWQ20hkcfze694tD684KebyEqGFyYqU=;7:1Q2Mo9P/QNr1f8wHQl71TP0UrC3daebGKi3pPbTqELDZDm8b37yZ2qdr4TcR07atBpmWQbgHpp2blTATFPHn/S3oCeSXdwY8dQa3sY660fEpZI3fyf/d0IM0MMQvOebB4BEABSAvbd/YiCsQMyG3D65doiIa1fOtob/4yv0At0PMf7Xf/KNzjBjS1si7ZhyHo7MvmrAyndRctXEOvDXxKLgKXRCAS/q+bkDZmO43iPH1Nku9g56rbzzxxTx5fJ3f SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB2028;20:D9yy3wDRAqzqYNF3ico86nS3BbtiXS5MVn+4cmimcoikKrkbdNA5BhPe6Kr7G4dae1wdCfa8wpRN8n9SmK1TtcPO/QxB0zZIzfseqRYIm5fqVb2F5aIDeX/1DOLfjgG0ymbHmA1nlmGt3BFe6w3/FpDgaCvSabnAzPsrrneOIY4= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2018 10:25:29.6960 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 565d69a0-9a2b-4897-4128-08d5f6cff0ad X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB2028 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This cleanup patch makes the function to use the primitive instead of direct dereferencing. Also, move fiq dereferencing out of cycle, since it's always constant. Signed-off-by: Kirill Tkhai --- fs/fuse/dev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 11ea2c4a38ab..214ce96b1d26 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -353,12 +353,13 @@ void fuse_queue_forget(struct fuse_conn *fc, struct fuse_forget_link *forget, static void flush_bg_queue(struct fuse_conn *fc) { + struct fuse_iqueue *fiq = &fc->iq; + while (fc->active_background < fc->max_background && !list_empty(&fc->bg_queue)) { struct fuse_req *req; - struct fuse_iqueue *fiq = &fc->iq; - req = list_entry(fc->bg_queue.next, struct fuse_req, list); + req = list_first_entry(&fc->bg_queue, struct fuse_req, list); list_del(&req->list); fc->active_background++; spin_lock(&fiq->waitq.lock); From patchwork Tue Jul 31 10:25:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10550599 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A739014E0 for ; Tue, 31 Jul 2018 10:25:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F4A82A4B2 for ; Tue, 31 Jul 2018 10:25:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 82A772A4C3; Tue, 31 Jul 2018 10:25:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F144A2A4B2 for ; Tue, 31 Jul 2018 10:25:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731383AbeGaMFU (ORCPT ); Tue, 31 Jul 2018 08:05:20 -0400 Received: from mail-eopbgr00117.outbound.protection.outlook.com ([40.107.0.117]:54143 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731350AbeGaMFT (ORCPT ); Tue, 31 Jul 2018 08:05:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G30o8RDpKGoI9zWPlvwHTDFaFafrCTLqiPwzWWktkTM=; b=QPJOUYe+7Ls2y8TSQDbPEnvq3Z/qy1NbO4TOaPpzej0SOdJWx9APLJy/IVslMEPGdVImVbjdiLfN11NGcZR71cXlPM3gAjM3RI4YDbMXACbw9MJcjWI3fPyWDuaHMFSYjLvVyNYTJmk8tDhqcof7/WR4RTqUQ2CqItDa9O4TZLE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (185.231.240.5) by HE1PR0801MB2028.eurprd08.prod.outlook.com (2603:10a6:3:50::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.21; Tue, 31 Jul 2018 10:25:37 +0000 Subject: [PATCH 2/2] fuse: Move clear_bit() up in request_end() From: Kirill Tkhai To: miklos@szeredi.hu, linux-fsdevel@vger.kernel.org, ktkhai@virtuozzo.com Date: Tue, 31 Jul 2018 13:25:35 +0300 Message-ID: <153303273523.387.7541221195413649436.stgit@localhost.localdomain> In-Reply-To: <153303268481.387.10809229593975235816.stgit@localhost.localdomain> References: <153303268481.387.10809229593975235816.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: VI1PR04CA0093.eurprd04.prod.outlook.com (2603:10a6:803:64::28) To HE1PR0801MB2028.eurprd08.prod.outlook.com (2603:10a6:3:50::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f43eff79-81db-4b1a-ab5a-08d5f6cff5c6 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:HE1PR0801MB2028; X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB2028;3:N7kHHJb33TEmaSXq7Vbz6KnY+2NaQJcwvKr9sTYCk5priIF6rVujik7VxwwCGTKOcLbFc2Vn2l9JupiY1JXbc+UI4Md2uZHxbbNridw3vXg6cPOX86Ba2Es4ypxImi5632ab9ooalBFCSHdZzbi9HIqVhSDrohNRi2TObD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VXSvxAqvCziDIXrFCaepyEUBpL5i6GLkFIjF83qrLDdoMf9K4VW1TOaxWdtxihTjoUBlIvnN9f0eRDa1WL9wpMAjycuXKNzORWMjbrj4fSwKdORXlH/FAU5qIcwOa1qRPUadPnxKgWZmVNN84eHaUl2hfxEMXHdxwmNfae9IgsHn;4:aFa27wtnjQCPqqQc4Kc8fK+lQUBBhJPytt9WjxV4n8muiryJ9OzzCzI0NFRmDFKoG/K8HGYNN2NFBXvpY7xxIOSDqzOACbFsJw3wBLGb86NXjrvHca9PCO9VMVLmJGItFBzLY6DWfgU/cri1LHJeyKVQpAoyjPukaz2gsapJlbPFfz9nmigFOgZ5RcuouTbDv8aoUcLnhMBSaem6QDjVGfGPGeAvlz6haCajN/tN7nL8JGVIcD6VwZTQs04LocrY3sjeinOMtVwTWQI6TnfljA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016);SRVR:HE1PR0801MB2028;BCL:0;PCL:0;RULEID:;SRVR:HE1PR0801MB2028; X-Forefront-PRVS: 0750463DC9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(136003)(366004)(376002)(346002)(396003)(39850400004)(199004)(189003)(76176011)(105586002)(33896004)(81156014)(14444005)(11346002)(97736004)(86362001)(7696005)(106356001)(58126008)(53936002)(2486003)(446003)(52116002)(26005)(25786009)(6506007)(55016002)(8936002)(9686003)(386003)(23676004)(316002)(16526019)(230700001)(186003)(47776003)(305945005)(103116003)(66066001)(68736007)(476003)(2906002)(486006)(956004)(478600001)(6116002)(7736002)(5660300001)(3846002)(81166006)(8676002)(61506002)(50466002);DIR:OUT;SFP:1102;SCL:1;SRVR:HE1PR0801MB2028;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BHE1PR0801MB2028=3B23=3AS9NDk?= =?utf-8?q?rT9KdCq8o0acWI/AlYOJnGXdUw2s/MWwD1EW6eBeZNX7bx5EMU8nWnkAqrBzuhxFQ?= =?utf-8?q?GQnQUruO87V4ZiAE0oKVI6hnC11WDBb4J3IMtRaCbGUAYtXiohiSMzhE84Hy/3nCX?= =?utf-8?q?D3wb11VZHCtkhNn+eYmX1xRQQrMtCf5cwrIkVIy9NlDH6GenOXpKAdx53Wrteqa5m?= =?utf-8?q?p6tCBz2uSjIaFPy+2sycthTNjIOPFFBoZbZwVehdxH9FDRrK9kaG2NXFmqwlLqs9W?= =?utf-8?q?6fiYD+ImU9HdO1EbH9GL6MpImQ/EbIUcvTJDuUen3Vthm2Qo6/LN059vRMg26RWdi?= =?utf-8?q?M+hzGUVHVX3Vrn9UXiWj4DF2PeZXn7b9aAMyCnuZJxwJ7bM6ggjg7VMzvq41uEBvk?= =?utf-8?q?m2GshWLvCP8a8Cdp5C6VUTDIkso8Ck2Qz5htVKnrpDWOy1EZwKBIcYt8W+We7bGh0?= =?utf-8?q?UrpkcJD+QVVfephUVpIRAoEeEvceGDSpNxqVc8gG2pIlWlpzYa8Y6RP2sR2uWfAu0?= =?utf-8?q?7Se777z7fPjNhgeOTmJsod8Znt0teWwbUKeaf+7xslQjy+E4dJimmK/l84pEYKeNX?= =?utf-8?q?QavO/4w0wC0TqUo7IiHXFr9NNrnk1o9Zco3g3NcOiKP2uYLCPf8CDiBfJyBRBlx9p?= =?utf-8?q?MSBsTs6Uh+67We+haMGbqdhoPEmHAVRs0CCJX+WDuhTJq239d1h26Liir24fjOylZ?= =?utf-8?q?V0rg5K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virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2018 10:25:37.9940 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f43eff79-81db-4b1a-ab5a-08d5f6cff5c6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB2028 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Nobody can clear FR_BACKGROUND bit on processing request in parallel, so it's possible to do it out of fc->lock. Signed-off-by: Kirill Tkhai --- fs/fuse/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 214ce96b1d26..ce07a41ff8fe 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -390,8 +390,8 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req) WARN_ON(test_bit(FR_PENDING, &req->flags)); WARN_ON(test_bit(FR_SENT, &req->flags)); if (test_bit(FR_BACKGROUND, &req->flags)) { - spin_lock(&fc->lock); clear_bit(FR_BACKGROUND, &req->flags); + spin_lock(&fc->lock); if (fc->num_background == fc->max_background) fc->blocked = 0;