Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263983
b: refs/heads/master
c: a66e7cc
h: refs/heads/master
i:
  263981: fe77060
  263979: cad5c0a
  263975: 801de5a
  263967: 33f6cc9
v: v3
  • Loading branch information
Josef Bacik authored and Chris Mason committed Sep 18, 2011
1 parent 08fce28 commit b94be42
Show file tree
Hide file tree
Showing 2 changed files with 12 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: 48802c8ae2a9d618ec734a61283d645ad527e06c
refs/heads/master: a66e7cc626f42de6c745963fe0d807518fa49d39
13 changes: 11 additions & 2 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -4018,7 +4018,8 @@ struct inode *btrfs_lookup_dentry(struct inode *dir, struct dentry *dentry)
memcpy(&location, dentry->d_fsdata, sizeof(struct btrfs_key));
kfree(dentry->d_fsdata);
dentry->d_fsdata = NULL;
d_clear_need_lookup(dentry);
/* This thing is hashed, drop it for now */
d_drop(dentry);
} else {
ret = btrfs_inode_by_name(dir, dentry, &location);
}
Expand Down Expand Up @@ -4085,7 +4086,15 @@ static void btrfs_dentry_release(struct dentry *dentry)
static struct dentry *btrfs_lookup(struct inode *dir, struct dentry *dentry,
struct nameidata *nd)
{
return d_splice_alias(btrfs_lookup_dentry(dir, dentry), dentry);
struct dentry *ret;

ret = d_splice_alias(btrfs_lookup_dentry(dir, dentry), dentry);
if (unlikely(d_need_lookup(dentry))) {
spin_lock(&dentry->d_lock);
dentry->d_flags &= ~DCACHE_NEED_LOOKUP;
spin_unlock(&dentry->d_lock);
}
return ret;
}

unsigned char btrfs_filetype_table[] = {
Expand Down

0 comments on commit b94be42

Please sign in to comment.