Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299821
b: refs/heads/master
c: fede766
h: refs/heads/master
i:
  299819: 005a4a9
v: v3
  • Loading branch information
Chris Mason committed Apr 27, 2012
1 parent d1d2bcb commit 5c29b6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 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: 7654b72417e10e294563496e25211200f9b8b6d3
refs/heads/master: fede766f28dd766d4e8feb321fdb19edb21ef6fb
30 changes: 1 addition & 29 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -4192,7 +4192,6 @@ static int btrfs_real_readdir(struct file *filp, void *dirent,
struct btrfs_path *path;
struct list_head ins_list;
struct list_head del_list;
struct qstr q;
int ret;
struct extent_buffer *leaf;
int slot;
Expand Down Expand Up @@ -4283,7 +4282,6 @@ static int btrfs_real_readdir(struct file *filp, void *dirent,

while (di_cur < di_total) {
struct btrfs_key location;
struct dentry *tmp;

if (verify_dir_item(root, leaf, di))
break;
Expand All @@ -4304,33 +4302,7 @@ static int btrfs_real_readdir(struct file *filp, void *dirent,
d_type = btrfs_filetype_table[btrfs_dir_type(leaf, di)];
btrfs_dir_item_key_to_cpu(leaf, di, &location);

q.name = name_ptr;
q.len = name_len;
q.hash = full_name_hash(q.name, q.len);
tmp = d_lookup(filp->f_dentry, &q);
if (!tmp) {
struct btrfs_key *newkey;

newkey = kzalloc(sizeof(struct btrfs_key),
GFP_NOFS);
if (!newkey)
goto no_dentry;
tmp = d_alloc(filp->f_dentry, &q);
if (!tmp) {
kfree(newkey);
dput(tmp);
goto no_dentry;
}
memcpy(newkey, &location,
sizeof(struct btrfs_key));
tmp->d_fsdata = newkey;
tmp->d_flags |= DCACHE_NEED_LOOKUP;
d_rehash(tmp);
dput(tmp);
} else {
dput(tmp);
}
no_dentry:

/* is this a reference to our own snapshot? If so
* skip it.
*
Expand Down

0 comments on commit 5c29b6b

Please sign in to comment.