Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60816
b: refs/heads/master
c: d7dd618
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Linus Torvalds committed Jul 17, 2007
1 parent ed37d14 commit 3e13aa2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 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: 10f11c341da8c0ec6b8b024e892108a6537ba8c4
refs/heads/master: d7dd618a5901ce0b44ef518208b35f728775db74
26 changes: 10 additions & 16 deletions trunk/fs/exportfs/expfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,30 +116,23 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent,
if (IS_ERR(result))
return result;

if (S_ISDIR(result->d_inode->i_mode) &&
(result->d_flags & DCACHE_DISCONNECTED)) {
/* it is an unconnected directory, we must connect it */
;
} else {
if (acceptable(context, result))
return result;
if (S_ISDIR(result->d_inode->i_mode)) {
if (S_ISDIR(result->d_inode->i_mode)) {
if (!(result->d_flags & DCACHE_DISCONNECTED)) {
if (acceptable(context, result))
return result;
err = -EACCES;
goto err_result;
}

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

alias = find_acceptable_alias(result, acceptable, context);
if (alias)
return alias;
}

/* It's a directory, or we are required to confirm the file's
* location in the tree based on the parent information
*/
dprintk("find_exported_dentry: need to look harder for %s/%d\n",sb->s_id,*(int*)obj);
if (S_ISDIR(result->d_inode->i_mode))
target_dir = dget(result);
else {
if (parent == NULL)
goto err_result;

Expand All @@ -149,6 +142,7 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent,
goto err_result;
}
}

/*
* Now we need to make sure that target_dir is properly connected.
* It may already be, as the flag isn't always updated when connection
Expand Down

0 comments on commit 3e13aa2

Please sign in to comment.