public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: andros@netapp.com
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/1] nfs4 use mandatory attribute file type in nfs4_get_root
Date: Mon, 14 Jun 2010 18:02:06 -0400	[thread overview]
Message-ID: <1276552926.3953.8.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <1276203143-2118-1-git-send-email-andros@netapp.com>

On Thu, 2010-06-10 at 16:52 -0400, andros@netapp.com wrote:
> From: Andy Adamson <andros@netapp.com>
> 
> decode_attr_type sets fattr->mode.

Well, yes... It sets part of fattr->mode. More specifically, though, it
sets the file type part, so your patch is correct.

I'll fix up the above changelog entry so that it is a bit more
descriptive. How about the following?

        S_ISDIR(fsinfo.fattr->mode) checks the file type rather than the
        mode bits, so we should be checking for the NFS_ATTR_FATTR_TYPE
        fattr property.

> 
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
>  fs/nfs/getroot.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c
> index 7428f7d..a70e446 100644
> --- a/fs/nfs/getroot.c
> +++ b/fs/nfs/getroot.c
> @@ -146,7 +146,7 @@ int nfs4_get_rootfh(struct nfs_server *server, struct nfs_fh *mntfh)
>  		goto out;
>  	}
>  
> -	if (!(fsinfo.fattr->valid & NFS_ATTR_FATTR_MODE)
> +	if (!(fsinfo.fattr->valid & NFS_ATTR_FATTR_TYPE)
>  			|| !S_ISDIR(fsinfo.fattr->mode)) {
>  		printk(KERN_ERR "nfs4_get_rootfh:"
>  		       " getroot encountered non-directory\n");



  reply	other threads:[~2010-06-14 22:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10 20:52 [PATCH 1/1] nfs4 use mandatory attribute file type in nfs4_get_root andros
2010-06-14 22:02 ` Trond Myklebust [this message]
     [not found]   ` <1276552926.3953.8.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2010-06-15 13:30     ` William A. (Andy) Adamson

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=1276552926.3953.8.camel@heimdal.trondhjem.org \
    --to=trond.myklebust@netapp.com \
    --cc=andros@netapp.com \
    --cc=linux-nfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox