Re: [PATCH] VFS: Fix automount for negative autofs dentries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +	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.

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux