GIT: unionfs2-2.6.27.y: Unionfs: follow_link locking fixes

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


commit 11fa87924aef957c8203f1f6c7f4e937c7633102
Author: Erez Zadok <ezk at cs.sunysb.edu>
Date:   Fri Feb 15 17:18:48 2008 -0500

    Unionfs: follow_link locking fixes
    
    Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>

diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
index 8d939dc..6377533 100644
--- a/fs/unionfs/inode.c
+++ b/fs/unionfs/inode.c
@@ -820,7 +820,11 @@ static void *unionfs_follow_link(struct dentry *dentry, struct nameidata *nd)
 	err = 0;
 
 out:
-	unionfs_check_dentry(dentry);
+	if (!err) {
+		unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD);
+		unionfs_check_dentry(dentry);
+		unionfs_unlock_dentry(dentry);
+	}
 	unionfs_check_nd(nd);
 	return ERR_PTR(err);
 }


More information about the unionfs-cvs mailing list