diff mbox series

[5/5] NFSv4/pNFS: Return an error if _nfs4_pnfs_v3_ds_connect can't load NFSv3

Message ID 20210704020510.4898-5-trondmy@kernel.org (mailing list archive)
State New, archived
Headers show
Series [1/5] NFSv4/pnfs: Fix the layout barrier update | expand

Commit Message

Trond Myklebust July 4, 2021, 2:05 a.m. UTC
From: Trond Myklebust <trond.myklebust@hammerspace.com>

Currently we fail to return an error if the NFSv3 module failed to load
when we're trying to connect to a pNFS data server.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
 fs/nfs/pnfs_nfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index 1c2c0d08614e..cf19914fec81 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -855,7 +855,7 @@  static int _nfs4_pnfs_v3_ds_connect(struct nfs_server *mds_srv,
 	dprintk("--> %s DS %s\n", __func__, ds->ds_remotestr);
 
 	if (!load_v3_ds_connect())
-		goto out;
+		return -EPROTONOSUPPORT;
 
 	list_for_each_entry(da, &ds->ds_addrs, da_node) {
 		dprintk("%s: DS %s: trying address %s\n",