diff options
author | Andy Adamson <andros@netapp.com> | 2010-06-16 15:51:02 +0200 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-06-22 19:17:43 +0200 |
commit | f799bdb355edaabd81b778087613409a8932fbe9 (patch) | |
tree | e2d27df6984a11b3710fbc5ceb2dd874c375b3bb /fs/nfs/getroot.c | |
parent | Linux 2.6.35-rc3 (diff) | |
download | linux-f799bdb355edaabd81b778087613409a8932fbe9.tar.xz linux-f799bdb355edaabd81b778087613409a8932fbe9.zip |
nfs4 use mandatory attribute file type in nfs4_get_root
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>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org
Diffstat (limited to 'fs/nfs/getroot.c')
-rw-r--r-- | 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 7428f7d6273b..a70e446e1605 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"); |