> +     if (!(flags & LOOKUP_FOLLOW)) {
> +             /* We do, however, want to mount if someone wants to open or
> +              * create a file of any type under the mountpoint, wants to
> +              * traverse through the mountpoint or wants to open the mounted
> +              * directory.
> +              */
> +             if (flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY |
> +                          LOOKUP_OPEN | LOOKUP_CREATE))
> +                     goto need_automount;
> +
> +             /* Also, autofs may mark negative dentries as being automount
> +              * points.  These will need the attentions of the daemon to
> +              * instantiate them before they can be used.
> +              */
> +             if (!path->dentry->d_inode)
> +                     goto need_automount;
>               return -EISDIR;
> +     }
> +need_automount:

That's some really odd code structure.

        if (!(flags & (LOOKUP_FOLLOW | LOOKUP_CONTINUE | LOOKUP_DIRECTORY |
                        LOOKUP_OPEN | LOOKUP_CREATE)) &&
            path->dentry->d_inode)
                return -EISDIR;

would do the same.

_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to