Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176597
b: refs/heads/master
c: 36b6413
h: refs/heads/master
i:
  176595: 018c837
v: v3
  • Loading branch information
Ian Kent authored and Linus Torvalds committed Dec 16, 2009
1 parent d490fea commit 5dd4650
Show file tree
Hide file tree
Showing 2 changed files with 11 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: c4cd70b3e3e95cc2201a00edf6deb52327d73c6b
refs/heads/master: 36b6413ef301d30f60037e497ecb902897895473
12 changes: 10 additions & 2 deletions trunk/fs/autofs4/root.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ static void autofs4_del_active(struct dentry *dentry)
return;
}

static unsigned int autofs4_need_mount(unsigned int flags)
{
unsigned int res = 0;
if (flags & (TRIGGER_FLAGS | TRIGGER_INTENTS))
res = 1;
return res;
}

static int autofs4_dir_open(struct inode *inode, struct file *file)
{
struct dentry *dentry = file->f_path.dentry;
Expand Down Expand Up @@ -168,7 +176,7 @@ static int try_to_fill_dentry(struct dentry *dentry, int flags)
}
/* Trigger mount for path component or follow link */
} else if (dentry->d_flags & DCACHE_AUTOFS_PENDING ||
flags & (TRIGGER_FLAGS | TRIGGER_INTENTS) ||
autofs4_need_mount(flags) ||
current->link_count) {
DPRINTK("waiting for mount name=%.*s",
dentry->d_name.len, dentry->d_name.name);
Expand Down Expand Up @@ -234,7 +242,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
autofs4_expire_wait(dentry);

/* We trigger a mount for almost all flags */
lookup_type = nd->flags & (TRIGGER_FLAGS | TRIGGER_INTENTS);
lookup_type = autofs4_need_mount(nd->flags);
if (!(lookup_type || dentry->d_flags & DCACHE_AUTOFS_PENDING))
goto follow;

Expand Down

0 comments on commit 5dd4650

Please sign in to comment.