Unionfs ODF: prevent leaking /odf/* dentries
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 30 Nov 2007 19:17:34 +0000 (14:17 -0500)
committerRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Thu, 1 May 2008 23:03:24 +0000 (19:03 -0400)
Upon cache coherency, also dput the odf.dentry.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/dentry.c

index ada52f1244941de05c1b4289ba17317820475d44..a8da175225c761b5ccac9cb73d56902e6cb32818 100644 (file)
@@ -134,6 +134,11 @@ static bool __unionfs_d_revalidate_one(struct dentry *dentry,
                        if (locked)
                                mutex_unlock(&dentry->d_inode->i_mutex);
                }
+               /* on reval, als purge the odf dentry, if any */
+               if (UNIONFS_D(dentry)->odf.dentry) {
+                       dput(UNIONFS_D(dentry)->odf.dentry);
+                       UNIONFS_D(dentry)->odf.dentry = NULL;
+               }
 
                result = unionfs_lookup_backend(dentry, &lowernd,
                                                interpose_flag);