Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31813
b: refs/heads/master
c: a90b9c0
h: refs/heads/master
i:
  31811: ac748fc
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Jul 3, 2006
1 parent 566cd2b commit 5d53cc0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 13e83599d282ddfd544600df9db5ab343ac4662f
refs/heads/master: a90b9c05df3c1e58eaedc28795d0f5abd896c098
4 changes: 2 additions & 2 deletions trunk/fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,10 +1339,10 @@ void d_move(struct dentry * dentry, struct dentry * target)
*/
if (target < dentry) {
spin_lock(&target->d_lock);
spin_lock(&dentry->d_lock);
spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
} else {
spin_lock(&dentry->d_lock);
spin_lock(&target->d_lock);
spin_lock_nested(&target->d_lock, DENTRY_D_LOCK_NESTED);
}

/* Move the dentry to the target hash queue, if on different bucket */
Expand Down
12 changes: 12 additions & 0 deletions trunk/include/linux/dcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,18 @@ struct dentry {
unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */
};

/*
* dentry->d_lock spinlock nesting subclasses:
*
* 0: normal
* 1: nested
*/
enum dentry_d_lock_class
{
DENTRY_D_LOCK_NORMAL, /* implicitly used by plain spin_lock() APIs. */
DENTRY_D_LOCK_NESTED
};

struct dentry_operations {
int (*d_revalidate)(struct dentry *, struct nameidata *);
int (*d_hash) (struct dentry *, struct qstr *);
Expand Down

0 comments on commit 5d53cc0

Please sign in to comment.