[PATCH] CIFS: fix automount for DFS shares

Jeff Layton jlayton at samba.org
Mon Oct 17 04:45:42 MDT 2011


On Mon, 17 Oct 2011 11:59:03 +0200
Gerlando Falauto <gerlando.falauto at keymile.com> wrote:

> Automounting directories are now invalidated by .d_revalidate()
> so to be d_instantiate()d again with the right DCACHE_NEED_AUTOMOUNT
> flag
> 
> Signed-off-by: Gerlando Falauto <gerlando.falauto at keymile.com>
> ---
>  fs/cifs/dir.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
> index 9ea65cf..67f54d3 100644
> --- a/fs/cifs/dir.c
> +++ b/fs/cifs/dir.c
> @@ -637,8 +637,13 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
>  	if (direntry->d_inode) {
>  		if (cifs_revalidate_dentry(direntry))
>  			return 0;
> -		else
> +		else {
> +			/* We want automonting inodes to be
> +			 * considered invalid or so */

The comment is a little unclear. A better comment might be -- "Forcibly
invalidate automounting inodes", or something along those lines...

> +			if (IS_AUTOMOUNT(direntry->d_inode))
> +				return 0;
>  			return 1;
> +		}
>  	}
>  
>  	/*

The patch itself looks reasonable though...

Reviewed-by: Jeff Layton <jlayton at samba.org>


More information about the samba-technical mailing list