From: Erez Zadok Date: Fri, 15 Feb 2008 22:18:48 +0000 (-0500) Subject: Unionfs: follow_link locking fixes X-Git-Tag: unionfs-2.2.4~11 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=384c4b54a2af876f5f3b91ba938905ebb3528cd8;p=unionfs-2.6.31.y.git Unionfs: follow_link locking fixes Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c index 8d939dc1f45..63775333ec1 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); }