From 908e0a8a265fe8057604a9a30aec3f0be7bb5ebb Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Wed, 7 Mar 2007 20:41:30 -0800 Subject: [PATCH] [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 --- fs/ecryptfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.30.2