projects/linux·commit 908e0a8a

[PATCH] ecryptfs: nested locking annotation

908e0a8a · Peter Zijlstra <[email protected]> · 2007-03-07 20:41:30 -08:00

ecryptfs uses a lock_parent() function, which I hope really locks the parents
and is not abused

Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Michael Halcrow <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
908e0a8a265fe8057604a9a30aec3f0be7bb5ebb
Parents
f70c81d4

Changes

1 files changed · +1 −1

FileStatusAddDelContent
fs/ecryptfs/inode.cmodified+1−1View file

fs/ecryptfs/inode.c

View file
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index e62f3fc..1548be2 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;
}