Skip to content

Commit

Permalink
[PATCH] ecryptfs: nested locking annotation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Zijlstra authored and Linus Torvalds committed Mar 8, 2007
1 parent f70c81d commit 908e0a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ecryptfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 908e0a8

Please sign in to comment.