GIT: unionfs2-2.6.27.y: Unionfs: ensure we have lower dentries in d_iput

Erez Zadok ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:17:44 EDT 2010


commit 057f47188375c5918342622fe6cd168ae94cf73b
Author: Erez Zadok <ezk at cs.sunysb.edu>
Date:   Wed Jan 9 19:07:29 2008 -0500

    Unionfs: ensure we have lower dentries in d_iput
    
    Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>

diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c
index d969640..cd15243 100644
--- a/fs/unionfs/dentry.c
+++ b/fs/unionfs/dentry.c
@@ -507,9 +507,10 @@ static void unionfs_d_iput(struct dentry *dentry, struct inode *inode)
 {
 	int bindex, rc;
 
+	BUG_ON(!dentry);
 	unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD);
 
-	if (dbstart(dentry) < 0)
+	if (!UNIONFS_D(dentry) || dbstart(dentry) < 0)
 		goto drop_lower_inodes;
 	for (bindex = dbstart(dentry); bindex <= dbend(dentry); bindex++) {
 		if (unionfs_lower_mnt_idx(dentry, bindex)) {


More information about the unionfs-cvs mailing list