GIT: unionfs2-2.6.27.y: Unionfs: don't dereference dentry without lower branches in d_release
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:17:57 EDT 2010
commit f72a33d23b51630c010940337291352a12f7a21e
Author: Erez Zadok <ezk at cs.sunysb.edu>
Date: Tue Apr 15 13:07:44 2008 -0400
Unionfs: don't dereference dentry without lower branches in d_release
Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>
diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c
index ee0da4f..e5f894c 100644
--- a/fs/unionfs/dentry.c
+++ b/fs/unionfs/dentry.c
@@ -482,12 +482,14 @@ static void unionfs_d_release(struct dentry *dentry)
int bindex, bstart, bend;
unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD);
+ if (unlikely(!UNIONFS_D(dentry)))
+ goto out; /* skip if no lower branches */
/* must lock our branch configuration here */
unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD);
unionfs_check_dentry(dentry);
/* this could be a negative dentry, so check first */
- if (unlikely(!UNIONFS_D(dentry) || dbstart(dentry) < 0)) {
+ if (dbstart(dentry) < 0) {
unionfs_unlock_dentry(dentry);
goto out; /* due to a (normal) failed lookup */
}
More information about the unionfs-cvs
mailing list