From: Erez Zadok Subject: [PATCH 07/17] Unionfs: follow_link locking fixes Date: Sat, 16 Feb 2008 21:57:16 -0500 Message-ID: <12032170503161-git-send-email-ezk@cs.sunysb.edu> References: <12032170461107-git-send-email-ezk@cs.sunysb.edu> Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@ftp.linux.org.uk, hch@infradead.org, Erez Zadok To: akpm@linux-foundation.org Return-path: Received: from filer.fsl.cs.sunysb.edu ([130.245.126.2]:36252 "EHLO filer.fsl.cs.sunysb.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754256AbYBQC5r (ORCPT ); Sat, 16 Feb 2008 21:57:47 -0500 In-Reply-To: <12032170461107-git-send-email-ezk@cs.sunysb.edu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Signed-off-by: Erez Zadok --- fs/unionfs/inode.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) 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); } -- 1.5.2.2