Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 908e0a8a authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Linus Torvalds
Browse files

[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: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f70c81d4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}