|
@@ -31,6 +31,9 @@ static int autofs4_root_readdir(struct file * filp, void * dirent, filldir_t fil
|
|
static struct dentry *autofs4_lookup(struct inode *,struct dentry *, struct nameidata *);
|
|
static struct dentry *autofs4_lookup(struct inode *,struct dentry *, struct nameidata *);
|
|
static void *autofs4_follow_link(struct dentry *, struct nameidata *);
|
|
static void *autofs4_follow_link(struct dentry *, struct nameidata *);
|
|
|
|
|
|
|
|
+#define TRIGGER_FLAGS (LOOKUP_CONTINUE | LOOKUP_DIRECTORY)
|
|
|
|
+#define TRIGGER_INTENTS (LOOKUP_OPEN | LOOKUP_CREATE)
|
|
|
|
+
|
|
const struct file_operations autofs4_root_operations = {
|
|
const struct file_operations autofs4_root_operations = {
|
|
.open = dcache_dir_open,
|
|
.open = dcache_dir_open,
|
|
.release = dcache_dir_close,
|
|
.release = dcache_dir_close,
|
|
@@ -291,7 +294,7 @@ static int try_to_fill_dentry(struct dentry *dentry, int flags)
|
|
return status;
|
|
return status;
|
|
}
|
|
}
|
|
/* Trigger mount for path component or follow link */
|
|
/* Trigger mount for path component or follow link */
|
|
- } else if (flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY) ||
|
|
|
|
|
|
+ } else if (flags & (TRIGGER_FLAGS | TRIGGER_INTENTS) ||
|
|
current->link_count) {
|
|
current->link_count) {
|
|
DPRINTK("waiting for mount name=%.*s",
|
|
DPRINTK("waiting for mount name=%.*s",
|
|
dentry->d_name.len, dentry->d_name.name);
|
|
dentry->d_name.len, dentry->d_name.name);
|
|
@@ -336,7 +339,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
|
|
nd->flags);
|
|
nd->flags);
|
|
|
|
|
|
/* If it's our master or we shouldn't trigger a mount we're done */
|
|
/* If it's our master or we shouldn't trigger a mount we're done */
|
|
- lookup_type = nd->flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY);
|
|
|
|
|
|
+ lookup_type = nd->flags & (TRIGGER_FLAGS | TRIGGER_INTENTS);
|
|
if (oz_mode || !lookup_type)
|
|
if (oz_mode || !lookup_type)
|
|
goto done;
|
|
goto done;
|
|
|
|
|