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),



Reply via email to