Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4184929rdb; Mon, 11 Dec 2023 11:11:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IEKckP1OYHxw0DdhokEHyKsZ2NtVnFpl75I84EWCKklaxbrG+Bsu/T3lbjX1YGjHC1QL5A8 X-Received: by 2002:a0c:e7ca:0:b0:67a:9641:5c83 with SMTP id c10-20020a0ce7ca000000b0067a96415c83mr7954426qvo.11.1702321892284; Mon, 11 Dec 2023 11:11:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702321892; cv=none; d=google.com; s=arc-20160816; b=kDZos5E2UFK0mewZt1p+oO6865CxDh+/kO5jBNbBTGHXFQN4zdk8N4X+/nwJh2eMQq 7IhPb2MuFjlmPmIQZgbSqCLP0LvfiBON0VmBhWpyLzCMVHbbNOR3CbGv5/GXmd9tUn/H Obi3LT+0vLQbZEBOi1Jxn6KRg+Ktm45f9WPQug55eHmjfBEf5HZvHJGZfj/uLRh5Cl+A AD19MAczuvM/awMAU9tf1v1eQHSMVXQZoRzse0BK2FiF+bAxJvueEtZvrB8enoy9sRvU apgg3I8/WVLu7DjoQ4/za+ehLOlbze3puFGC1iFulb+Ckabqudhaj/MLNgisr7F5k1mC z04A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=/Rtkzcsv8kzgc8T4PwLaUwempDK+53xq2O37eAIju6o=; fh=LcgCyFaL6RR0V5e7XH4Is3imaQiaqFv7Vgn+NZf3Wno=; b=XqKR9cBjUEXbvqXLvuKK5QPl92R0rbbXVm4ZHMzj32+N0+phf4Gl/rjLC8PKDtPa4U zMREvSDDkvJETrheSs+4Cct37oswGEj1C3CB6CAyp0/jvo+9wU8exLcNxk6PXWJmcbDP nX9CrebvZo5t00yVuARLd1yk6B0Mlgz7GUVsws68TqkK2oZWbohvrFg/xKOyGpyVnWnA bxQE0m+sD88YKkt2sNbFgABpaUzluSMqgglv5+u6aHsm8+aKyrcOle9duKqc0hYNe0Js ZPOBcWmOdUWPebKKGy5f3E/QAQFk9xdkg7vzqe81UfONiAiOW4OC+J+Luct9S07mnNwL //4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=Jks55oU7; spf=pass (google.com: domain of linux-nfs+bounces-494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-494-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f11-20020a056214164b00b0067a2145e736si8974271qvw.525.2023.12.11.11.11.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 11:11:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=Jks55oU7; spf=pass (google.com: domain of linux-nfs+bounces-494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-494-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7E31F1C20901 for ; Mon, 11 Dec 2023 19:11:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E4DFB524BD; Mon, 11 Dec 2023 19:11:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="Jks55oU7" X-Original-To: linux-nfs@vger.kernel.org Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDB17BD; Mon, 11 Dec 2023 11:11:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=/Rtkzcsv8kzgc8T4PwLaUwempDK+53xq2O37eAIju6o=; b=Jks55oU7rWGh8Gjb3z9pm/ASZV splnAzk8Kuua7BffcEhEnk1XNim2qW0j/aVpBCtraGU1+XKNhizBpMcqNWeTn/Akv+rRO0aILl3fV jqkaBuffi3yv4Xe27LgcVPgofKyt0Pl8g7ztVmt1AJ2BJa7mKz0HsMWb4XRVZItxQIHvJvCcB5nge qMqx6XP2dL5d8X8scShWKyAucys69reFq7/J7AU+2r5vrcoWWxzL4LrdOF/P1l43Gux8eHuEQMEmh 04BjRqlSyevf9neK5+yeJckBIMUAODRpq52kHQKjicaKU8fx9bTgiEQq23zfz4Q+6J5/ucGEW1Lvh 6/phlXkA==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1rClgT-00AzWG-0e; Mon, 11 Dec 2023 19:11:17 +0000 Date: Mon, 11 Dec 2023 19:11:17 +0000 From: Al Viro To: NeilBrown Cc: Chuck Lever , Christian Brauner , Jens Axboe , Oleg Nesterov , Jeff Layton , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org Subject: Re: [PATCH 1/3] nfsd: use __fput_sync() to avoid delayed closing of files. Message-ID: <20231211191117.GD1674809@ZenIV> References: <20231208033006.5546-1-neilb@suse.de> <20231208033006.5546-2-neilb@suse.de> <170224845504.12910.16483736613606611138@noble.neil.brown.name> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <170224845504.12910.16483736613606611138@noble.neil.brown.name> Sender: Al Viro On Mon, Dec 11, 2023 at 09:47:35AM +1100, NeilBrown wrote: > Similarly would could wrap __fput_sync() is a more friendly name, but > that would be better if we actually renamed the function. > > void fput_now(struct file *f) > { > __fput_sync(f); > } It is unfriendly *precisely* because it should not be used without a very good reason. It may be the last opened file keeping a lazy-umounted mount alive. It may be taking pretty much any locks, or eating a lot of stack space. It really isn't a general-purpose API; any "more friendly name" is going to be NAKed for that reason alone. Al, very much tempted to send a patch renaming that sucker to __fput_dont_use_that_unless_you_really_know_what_you_are_doing().