summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAnna Schumaker <Anna.Schumaker@Netapp.com>2016-10-26 15:54:31 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-11-07 16:11:30 -0500
commit192747166a468dd8fb5d47ad9d5048c138c1fc25 (patch)
treef082f03274d1704bfc2b70eccbc69634e14d38eb /fs
parent8ef3295530ddc969ea9a3f307d94df97fcbc0629 (diff)
downloadlinux-192747166a468dd8fb5d47ad9d5048c138c1fc25.tar.gz
linux-192747166a468dd8fb5d47ad9d5048c138c1fc25.tar.bz2
linux-192747166a468dd8fb5d47ad9d5048c138c1fc25.zip
NFS: Don't print a pNFS error if we aren't using pNFS
We used to check for a valid layout type id before verifying pNFS flags as an indicator for if we are using pNFS. This changed in 3132e49ece with the introduction of multiple layout types, since now we are passing an array of ids instead of just one. Since then, users have been seeing a KERN_ERR printk show up whenever mounting NFS v4 without pNFS. This patch restores the original behavior of exiting set_pnfs_layoutdriver() early if we aren't using pNFS. Fixes 3132e49ece ("pnfs: track multiple layout types in fsinfo structure") Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/pnfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 56b2d96f9103..259ef85f435a 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -146,6 +146,8 @@ set_pnfs_layoutdriver(struct nfs_server *server, const struct nfs_fh *mntfh,
u32 id;
int i;
+ if (fsinfo->nlayouttypes == 0)
+ goto out_no_driver;
if (!(server->nfs_client->cl_exchange_flags &
(EXCHGID4_FLAG_USE_NON_PNFS | EXCHGID4_FLAG_USE_PNFS_MDS))) {
printk(KERN_ERR "NFS: %s: cl_exchange_flags 0x%x\n",