From: Peter Zijlstra 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 --- fs/ecryptfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/ecryptfs/inode.c~ecryptfs-nested-locking-annotation fs/ecryptfs/inode.c --- a/fs/ecryptfs/inode.c~ecryptfs-nested-locking-annotation +++ a/fs/ecryptfs/inode.c @@ -38,7 +38,7 @@ static struct dentry *lock_parent(struct 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; } _