diff options
Diffstat (limited to 'fs/autofs4/root.c')
-rw-r--r-- | fs/autofs4/root.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index 1e901e5ea013..87352654ff4e 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c | |||
@@ -31,6 +31,9 @@ static int autofs4_root_readdir(struct file * filp, void * dirent, filldir_t fil | |||
31 | static struct dentry *autofs4_lookup(struct inode *,struct dentry *, struct nameidata *); | 31 | static struct dentry *autofs4_lookup(struct inode *,struct dentry *, struct nameidata *); |
32 | static void *autofs4_follow_link(struct dentry *, struct nameidata *); | 32 | static void *autofs4_follow_link(struct dentry *, struct nameidata *); |
33 | 33 | ||
34 | #define TRIGGER_FLAGS (LOOKUP_CONTINUE | LOOKUP_DIRECTORY) | ||
35 | #define TRIGGER_INTENTS (LOOKUP_OPEN | LOOKUP_CREATE) | ||
36 | |||
34 | const struct file_operations autofs4_root_operations = { | 37 | const struct file_operations autofs4_root_operations = { |
35 | .open = dcache_dir_open, | 38 | .open = dcache_dir_open, |
36 | .release = dcache_dir_close, | 39 | .release = dcache_dir_close, |
@@ -291,7 +294,7 @@ static int try_to_fill_dentry(struct dentry *dentry, int flags) | |||
291 | return status; | 294 | return status; |
292 | } | 295 | } |
293 | /* Trigger mount for path component or follow link */ | 296 | /* Trigger mount for path component or follow link */ |
294 | } else if (flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY) || | 297 | } else if (flags & (TRIGGER_FLAGS | TRIGGER_INTENTS) || |
295 | current->link_count) { | 298 | current->link_count) { |
296 | DPRINTK("waiting for mount name=%.*s", | 299 | DPRINTK("waiting for mount name=%.*s", |
297 | dentry->d_name.len, dentry->d_name.name); | 300 | dentry->d_name.len, dentry->d_name.name); |
@@ -336,7 +339,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
336 | nd->flags); | 339 | nd->flags); |
337 | 340 | ||
338 | /* If it's our master or we shouldn't trigger a mount we're done */ | 341 | /* If it's our master or we shouldn't trigger a mount we're done */ |
339 | lookup_type = nd->flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY); | 342 | lookup_type = nd->flags & (TRIGGER_FLAGS | TRIGGER_INTENTS); |
340 | if (oz_mode || !lookup_type) | 343 | if (oz_mode || !lookup_type) |
341 | goto done; | 344 | goto done; |
342 | 345 | ||