[linux-cifs-client] [PATCH 1/3] cifs: always revalidate hardlinked inodes

Jeff Layton jlayton at samba.org
Mon May 17 13:01:20 MDT 2010


On Mon, 17 May 2010 07:18:56 -0400
Jeff Layton <jlayton at redhat.com> wrote:

> The old cifs_revalidate logic always revalidated hardlinked inodes.
> This hack allowed CIFS to pass some connectathon tests when server inode
> numbers aren't used (basic test7, in particular).
> 
> Signed-off-by: Jeff Layton <jlayton at redhat.com>
> ---
>  fs/cifs/inode.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
> index b35cb03..f52161a 100644
> --- a/fs/cifs/inode.c
> +++ b/fs/cifs/inode.c
> @@ -1511,6 +1511,10 @@ cifs_inode_needs_reval(struct inode *inode)
>  	if (time_after_eq(jiffies, cifs_i->time + HZ))
>  		return true;
>  
> +	/* hardlinked files get "special" treatment */
> +	if (S_ISREG(inode->i_mode) && inode->i_nlink != 1)
> +		return true;
> +
>  	return false;
>  }
>  

Steve mentioned on IRC that we should limit this behavior to the
noserverino case. Replacement patch attached.

-- 
Jeff Layton <jlayton at samba.org>


More information about the linux-cifs-client mailing list