GIT: unionfs2-2.6.27.y: bug fix: don't warn if trying to mntput a "negative" union object
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:16:28 EDT 2010
commit a8e2e078cb7fccb38943ba7a5f2c598ee81e3604
Author: Erez_Zadok <ezk at cs.sunysb.edu>
Date: Mon May 28 19:21:21 2007 -0400
bug fix: don't warn if trying to mntput a "negative" union object
In unionfs_d_release, we may get negative dentries which don't have a lower
mnt. In that case, don't print a warning message from unionfs_mntput about
trying to put a NULL mnt.
Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>
diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c
index 1653267..c9ff886 100644
--- a/fs/unionfs/dentry.c
+++ b/fs/unionfs/dentry.c
@@ -325,9 +325,11 @@ static void unionfs_d_release(struct dentry *dentry)
bend = dbend(dentry);
for (bindex = bstart; bindex <= bend; bindex++) {
dput(unionfs_lower_dentry_idx(dentry, bindex));
- unionfs_mntput(dentry, bindex);
-
unionfs_set_lower_dentry_idx(dentry, bindex, NULL);
+ /* NULL lower mnt is ok if this is a negative dentry */
+ if (!dentry->d_inode && !unionfs_lower_mnt_idx(dentry,bindex))
+ continue;
+ unionfs_mntput(dentry, bindex);
unionfs_set_lower_mnt_idx(dentry, bindex, NULL);
}
/* free private data (unionfs_dentry_info) here */
More information about the unionfs-cvs
mailing list