commit c477c78dda5e400d5859915188ba6e76ccf80787
Author: Rachita Kothiyal <[EMAIL PROTECTED]>
Date:   Sun Feb 24 19:34:00 2008 -0500

    Unionfs: d_parent related locking fixes
    
    Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>

diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c
index c4cd254..9002ec7 100644
--- a/fs/unionfs/copyup.c
+++ b/fs/unionfs/copyup.c
@@ -722,8 +722,7 @@ struct dentry *create_parents(struct inode *dir, struct 
dentry *dentry,
                child_dentry = parent_dentry;
 
                /* find the parent directory dentry in unionfs */
-               parent_dentry = child_dentry->d_parent;
-               dget(parent_dentry);
+               parent_dentry = dget_parent(child_dentry);
 
                /* find out the lower_parent_dentry in the given branch */
                lower_parent_dentry =
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index 315fe23..1cade88 100644
--- a/fs/unionfs/union.h
+++ b/fs/unionfs/union.h
@@ -488,7 +488,7 @@ extern int parse_branch_mode(const char *name, int *perms);
 /* locking helpers */
 static inline struct dentry *lock_parent(struct dentry *dentry)
 {
-       struct dentry *dir = dget(dentry->d_parent);
+       struct dentry *dir = dget_parent(dentry);
        mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);
        return dir;
 }
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to