[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241223050418.GI1977892@ZenIV>
Date: Mon, 23 Dec 2024 05:04:18 +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>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/11] VFS: introduce vfs_mkdir_return()
On Fri, Dec 20, 2024 at 01:54:19PM +1100, NeilBrown wrote:
> + error = dir->i_op->mkdir(idmap, dir, dentry, mode);
> + if (!error) {
> + fsnotify_mkdir(dir, dentry);
> + if (unlikely(d_unhashed(dentry))) {
> + struct dentry *d;
> + d = lookup_dcache((const struct qstr *)&dentry->d_name,
> + dentry->d_parent, 0);
> + if (IS_ERR(d)) {
> + error = PTR_ERR(d);
> + } else if (unlikely(d_is_negative(d))) {
... which will instantly oops if there's no cached dentry with
such name and parent. lookup_dcache() is pure dcache lookup;
it does *NOT* call ->lookup() on miss - just returns NULL.
Powered by blists - more mailing lists