Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300373
b: refs/heads/master
c: ee983e8
h: refs/heads/master
i:
  300371: 71fb54b
v: v3
  • Loading branch information
Linus Torvalds committed May 11, 2012
1 parent ca92722 commit e0310ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: 94753db5ed9ad97582ef453127d9626a7a2be602
refs/heads/master: ee983e89670704b2a05e897b161f2674a42d1508
9 changes: 6 additions & 3 deletions trunk/fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,6 @@ static inline int dentry_string_cmp(const unsigned char *cs, const unsigned char

static inline int dentry_cmp(const struct dentry *dentry, const unsigned char *ct, unsigned tcount)
{
if (dentry->d_name.len != tcount)
return 1;

/*
* Be careful about RCU walk racing with rename:
* use ACCESS_ONCE to fetch the name pointer.
Expand Down Expand Up @@ -1464,6 +1461,8 @@ static struct dentry *__d_instantiate_unique(struct dentry *entry,
continue;
if (alias->d_parent != entry->d_parent)
continue;
if (alias->d_name.len != len)
continue;
if (dentry_cmp(alias, name, len))
continue;
__dget(alias);
Expand Down Expand Up @@ -1882,6 +1881,8 @@ struct dentry *__d_lookup_rcu(const struct dentry *parent,
}
}

if (dentry->d_name.len != len)
continue;
if (!dentry_cmp(dentry, str, len))
return dentry;
}
Expand Down Expand Up @@ -1984,6 +1985,8 @@ struct dentry *__d_lookup(struct dentry *parent, struct qstr *name)
tlen, tname, name))
goto next;
} else {
if (dentry->d_name.len != len)
goto next;
if (dentry_cmp(dentry, str, len))
goto next;
}
Expand Down

0 comments on commit e0310ae

Please sign in to comment.