Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312878
b: refs/heads/master
c: a614a09
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Jul 14, 2012
1 parent eb4dab9 commit 28fdc63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 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: 12447c40394695c9a19920c65fea124bdf3ea034
refs/heads/master: a614a092bf28d58c742b9ec43209f3f78c3d9fb3
16 changes: 5 additions & 11 deletions trunk/fs/ocfs2/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,30 +170,24 @@ struct dentry *ocfs2_find_local_alias(struct inode *inode,
u64 parent_blkno,
int skip_unhashed)
{
struct list_head *p;
struct dentry *dentry = NULL;
struct dentry *dentry;

spin_lock(&inode->i_lock);
list_for_each(p, &inode->i_dentry) {
dentry = list_entry(p, struct dentry, d_alias);

list_for_each_entry(dentry, &inode->i_dentry, d_alias) {
spin_lock(&dentry->d_lock);
if (ocfs2_match_dentry(dentry, parent_blkno, skip_unhashed)) {
trace_ocfs2_find_local_alias(dentry->d_name.len,
dentry->d_name.name);

dget_dlock(dentry);
spin_unlock(&dentry->d_lock);
break;
spin_unlock(&inode->i_lock);
return dentry;
}
spin_unlock(&dentry->d_lock);

dentry = NULL;
}

spin_unlock(&inode->i_lock);

return dentry;
return NULL;
}

DEFINE_SPINLOCK(dentry_attach_lock);
Expand Down

0 comments on commit 28fdc63

Please sign in to comment.