mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
[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 <a.p.zijlstra@chello.nl> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
f70c81d4dd
commit
908e0a8a26
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user