commit f6a031c0aed2dc4ce6c025891cc6025b821858c2
Author: Erez Zadok <[EMAIL PROTECTED]>
Date:   Tue Apr 15 19:52:03 2008 -0400

    Unionfs: don't dereference dentry without lower branches in d_release
    
    Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>

diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c
index e4b15f9..b41c8f6 100644
--- a/fs/unionfs/dentry.c
+++ b/fs/unionfs/dentry.c
@@ -474,12 +474,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 */
        }
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to