* [PATCH 1/1] nfs4 use mandatory attribute file type in nfs4_get_root
@ 2010-06-10 20:52 andros
2010-06-14 22:02 ` Trond Myklebust
0 siblings, 1 reply; 3+ messages in thread
From: andros @ 2010-06-10 20:52 UTC (permalink / raw)
To: trond.myklebust; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
decode_attr_type sets fattr->mode.
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");
--
1.6.6
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/1] nfs4 use mandatory attribute file type in nfs4_get_root
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
[not found] ` <1276552926.3953.8.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2010-06-14 22:02 UTC (permalink / raw)
To: andros; +Cc: linux-nfs
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");
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-15 13:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
[not found] ` <1276552926.3953.8.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2010-06-15 13:30 ` William A. (Andy) Adamson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox