From: Peter Zijlstra Date: Thu, 8 Mar 2007 04:41:30 +0000 (-0800) Subject: [PATCH] ecryptfs: nested locking annotation X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=908e0a8a265fe8057604a9a30aec3f0be7bb5ebb;p=linux-beck.git [PATCH] ecryptfs: nested locking annotation ecryptfs uses a lock_parent() function, which I hope really locks the parents and is not abused Signed-off-by: Peter Zijlstra Cc: Michael Halcrow Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index e62f3fc7241e..1548be26b5e6 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -38,7 +38,7 @@ static struct dentry *lock_parent(struct dentry *dentry) struct dentry *dir; dir = dget(dentry->d_parent); - mutex_lock(&(dir->d_inode->i_mutex)); + mutex_lock_nested(&(dir->d_inode->i_mutex), I_MUTEX_PARENT); return dir; }