[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250207201409.GG1977892@ZenIV>
Date: Fri, 7 Feb 2025 20:14:09 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: NeilBrown <neilb@...e.de>
Cc: Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jeff Layton <jlayton@...nel.org>,
Dave Chinner <david@...morbit.com>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/19] VFS: add common error checks to lookup_one_qstr()
On Thu, Feb 06, 2025 at 04:42:42PM +1100, NeilBrown wrote:
> Callers of lookup_one_qstr() often check if the result is negative or
> positive.
> These changes can easily be moved into lookup_one_qstr() by checking the
> lookup flags:
> LOOKUP_CREATE means it is NOT an error if the name doesn't exist.
> LOOKUP_EXCL means it IS an error if the name DOES exist.
>
> This patch adds these checks, then removes error checks from callers,
> and ensures that appropriate flags are passed.
>
> This subtly changes the meaning of LOOKUP_EXCL. Previously it could
> only accompany LOOKUP_CREATE. Now it can accompany LOOKUP_RENAME_TARGET
> as well. A couple of small changes are needed to accommodate this. The
> NFS is functionally a no-op but ensures nfs_is_exclusive_create() does
> exactly what the name says.
Where's D/f/porting chunk? Mind you, this one needs _very_ careful
review and testing - you are touching codepaths that are convoluted
as hell and rarely tested.
Powered by blists - more mailing lists