Message ID | 153303272510.387.12118866693274687533.stgit@localhost.localdomain (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-fsdevel-owner@kernel.org> 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 <patchwork-linux-fsdevel@patchwork.kernel.org>; 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 <patchwork-linux-fsdevel@patchwork.kernel.org>; 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 <patchwork-linux-fsdevel@patchwork.kernel.org>; Tue, 31 Jul 2018 10:25:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731288AbeGaMFN (ORCPT <rfc822;patchwork-linux-fsdevel@patchwork.kernel.org>); 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 <rfc822;linux-fsdevel@vger.kernel.org>); 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 <ktkhai@virtuozzo.com> 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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: <HE1PR0801MB202841D17060E721796263C4CD2E0@HE1PR0801MB2028.eurprd08.prod.outlook.com> 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?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0PMf7Xf/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: <linux-fsdevel.vger.kernel.org> X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
fuse: Small cleanup series
|
expand
|
On Tue, Jul 31, 2018 at 12:25 PM, Kirill Tkhai <ktkhai@virtuozzo.com> wrote: > This cleanup patch makes the function to use the primitive > instead of direct dereferencing. Okay. > > Also, move fiq dereferencing out of cycle, since it's > always constant. Not much win. The compiler can guess as much... Applied, anyway. Thanks, Miklos
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);
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 <ktkhai@virtuozzo.com> --- fs/fuse/dev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)