From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:47622 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732316AbeGKDB1 (ORCPT ); Tue, 10 Jul 2018 23:01:27 -0400 Date: Wed, 11 Jul 2018 03:59:20 +0100 From: Al Viro To: Linus Torvalds Cc: linux-fsdevel , Linux Kernel Mailing List , Miklos Szeredi Subject: Re: [RFC][PATCH 16/42] now we can fold open_check_o_direct() into do_dentry_open() Message-ID: <20180711025920.GQ30522@ZenIV.linux.org.uk> References: <20180711021136.GN30522@ZenIV.linux.org.uk> <20180711022206.12571-1-viro@ZenIV.linux.org.uk> <20180711022206.12571-16-viro@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Jul 10, 2018 at 07:44:59PM -0700, Linus Torvalds wrote: > I like the patch, I hate the commit message. > > It makes sense right now in this sequence, but I'd really like the > commit message to say _why_ this sequence led up to this point. > > Right now I still remember you trying this, and having to revert it > because it didn't work before all the fput/put_filp issues. But a year > from now? Five years from now? > > So at least a "now that fput() works regardless of how far the open > got.." kind of explanation, ok? Umm... Something like These checks are better off in do_dentry_open(); the reason we couldn't put them there used to be that callers couldn't tell what kind of cleanup would do_dentry_open() failure call for. Now that we have FMODE_OPENED, cleanup is the same in all cases - it's simply fput(). So let's fold that into do_dentry_open(), as Christoph's patch tried to. perhaps?