[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <176186768028.1793333.3200874180667501034@noble.neil.brown.name>
Date: Fri, 31 Oct 2025 10:41:20 +1100
From: NeilBrown <neilb@...mail.net>
To: "Al Viro" <viro@...iv.linux.org.uk>
Cc: "Christian Brauner" <brauner@...nel.org>,
"Amir Goldstein" <amir73il@...il.com>, "Jan Kara" <jack@...e.cz>,
linux-fsdevel@...r.kernel.org, "Jeff Layton" <jlayton@...nel.org>,
"Chris Mason" <clm@...com>, "David Sterba" <dsterba@...e.com>,
"David Howells" <dhowells@...hat.com>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
"Danilo Krummrich" <dakr@...nel.org>, "Tyler Hicks" <code@...icks.com>,
"Miklos Szeredi" <miklos@...redi.hu>,
"Chuck Lever" <chuck.lever@...cle.com>,
"Olga Kornievskaia" <okorniev@...hat.com>,
"Dai Ngo" <Dai.Ngo@...cle.com>, "Namjae Jeon" <linkinjeon@...nel.org>,
"Steve French" <smfrench@...il.com>,
"Sergey Senozhatsky" <senozhatsky@...omium.org>,
"Carlos Maiolino" <cem@...nel.org>,
"John Johansen" <john.johansen@...onical.com>,
"Paul Moore" <paul@...l-moore.com>, "James Morris" <jmorris@...ei.org>,
"Serge E. Hallyn" <serge@...lyn.com>,
"Stephen Smalley" <stephen.smalley.work@...il.com>,
"Ondrej Mosnacek" <omosnace@...hat.com>,
"Mateusz Guzik" <mjguzik@...il.com>,
"Lorenzo Stoakes" <lorenzo.stoakes@...cle.com>,
"Stefan Berger" <stefanb@...ux.ibm.com>,
"Darrick J. Wong" <djwong@...nel.org>, linux-kernel@...r.kernel.org,
netfs@...ts.linux.dev, ecryptfs@...r.kernel.org,
linux-nfs@...r.kernel.org, linux-unionfs@...r.kernel.org,
linux-cifs@...r.kernel.org, linux-xfs@...r.kernel.org,
apparmor@...ts.ubuntu.com, linux-security-module@...r.kernel.org,
selinux@...r.kernel.org
Subject:
Re: [PATCH v4 12/14] ecryptfs: use new start_creating/start_removing APIs
On Thu, 30 Oct 2025, Al Viro wrote:
> On Thu, Oct 30, 2025 at 10:31:12AM +1100, NeilBrown wrote:
>
> > +static struct dentry *ecryptfs_start_creating_dentry(struct dentry *dentry)
> > {
> > - struct dentry *lower_dir_dentry;
> > + struct dentry *parent = dget_parent(dentry->d_parent);
>
> "Grab the reference to grandparent"?
>
That's somewhat embarrassing :-(
Fixed as below.
Thanks a lot!
NeilBrown
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index b3702105d236..6a5bca89e752 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -26,7 +26,7 @@
static struct dentry *ecryptfs_start_creating_dentry(struct dentry *dentry)
{
- struct dentry *parent = dget_parent(dentry->d_parent);
+ struct dentry *parent = dget_parent(dentry);
struct dentry *ret;
ret = start_creating_dentry(ecryptfs_dentry_to_lower(parent),
@@ -37,7 +37,7 @@ static struct dentry *ecryptfs_start_creating_dentry(struct dentry *dentry)
static struct dentry *ecryptfs_start_removing_dentry(struct dentry *dentry)
{
- struct dentry *parent = dget_parent(dentry->d_parent);
+ struct dentry *parent = dget_parent(dentry);
struct dentry *ret;
ret = start_removing_dentry(ecryptfs_dentry_to_lower(parent),
Powered by blists - more mailing lists