All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Gerlando Falauto <gerlando.falauto@keymile.com>
Cc: linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>,
	Jeffrey Layton <jlayton@redhat.com>
Subject: Re: [PATCH] CIFS: fix automount for DFS shares
Date: Sun, 23 Oct 2011 19:14:34 +0800	[thread overview]
Message-ID: <1319368474.7876.4.camel@perseus.themaw.net> (raw)
In-Reply-To: <1317985771-28876-2-git-send-email-gerlando.falauto@keymile.com>

On Fri, 2011-10-07 at 13:09 +0200, Gerlando Falauto wrote:
> Automounting directories are now invalidated by .d_revalidate()
> so to be d_instantiate()d again with the right DCACHE_NEED_AUTOMOUNT
> flag

But why doesn't CIFS know this is a DFS inode the first time around, it
appears to do a truck load of work looking that stuff up?

> 
> Signed-off-by: Gerlando Falauto <gerlando.falauto@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 */
> +			if (IS_AUTOMOUNT(direntry->d_inode))
> +				return 0;

I'd be inclined to set DCACHE_NEED_AUTOMOUNT here but are we certain
that cifs_revalidate_dentry() will always return 0 for a DFS inode or at
least ones that don't yet have DCACHE_NEED_AUTOMOUNT set and why?

>  			return 1;
> +		}
>  	}
>  
>  	/*



  reply	other threads:[~2011-10-23 11:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-07 11:09 CIFS fails to automount DFS shares Gerlando Falauto
2011-10-07 11:09 ` [PATCH] CIFS: fix automount for " Gerlando Falauto
2011-10-23 11:14   ` Ian Kent [this message]
2011-10-23 11:46     ` Jeff Layton
2011-10-23 13:45       ` Ian Kent
  -- strict thread matches above, loose matches on Subject: below --
2011-10-17  9:59 CIFS fails to automount " Gerlando Falauto
     [not found] ` <1318845543-15085-1-git-send-email-gerlando.falauto-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org>
2011-10-17  9:59   ` [PATCH] CIFS: fix automount for " Gerlando Falauto
     [not found]     ` <1318845543-15085-2-git-send-email-gerlando.falauto-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org>
2011-10-17 10:45       ` Jeff Layton
     [not found]         ` <20111017064542.036ff6bb-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2011-10-17 14:16           ` Steve French
2011-10-18  8:58   ` Gerlando Falauto
2011-10-18  8:58     ` Gerlando Falauto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1319368474.7876.4.camel@perseus.themaw.net \
    --to=raven@themaw.net \
    --cc=dhowells@redhat.com \
    --cc=gerlando.falauto@keymile.com \
    --cc=jlayton@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.