Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60817
b: refs/heads/master
c: fb66a19
h: refs/heads/master
i:
  60815: ed37d14
v: v3
  • Loading branch information
Christoph Hellwig authored and Linus Torvalds committed Jul 17, 2007
1 parent 3e13aa2 commit 54b10d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: d7dd618a5901ce0b44ef518208b35f728775db74
refs/heads/master: fb66a1989c8abc3015aa334f617658b277e5fe98
12 changes: 6 additions & 6 deletions trunk/fs/exportfs/expfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,19 @@ static int exportfs_get_name(struct dentry *dir, char *name,
return get_name(dir, name, child);
}

/*
* Check if the dentry or any of it's aliases is acceptable.
*/
static struct dentry *
find_acceptable_alias(struct dentry *result,
int (*acceptable)(void *context, struct dentry *dentry),
void *context)
{
struct dentry *dentry, *toput = NULL;

if (acceptable(context, result))
return result;

spin_lock(&dcache_lock);
list_for_each_entry(dentry, &result->d_inode->i_dentry, d_alias) {
dget_locked(dentry);
Expand Down Expand Up @@ -126,9 +132,6 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent,

target_dir = dget(result);
} else {
if (acceptable(context, result))
return result;

alias = find_acceptable_alias(result, acceptable, context);
if (alias)
return alias;
Expand Down Expand Up @@ -289,9 +292,6 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent,
}
}
dput(target_dir);
/* now result is properly connected, it is our best bet */
if (acceptable(context, result))
return result;

alias = find_acceptable_alias(result, acceptable, context);
if (alias)
Expand Down

0 comments on commit 54b10d7

Please sign in to comment.