NFSv4/pNFS: Return an error if _nfs4_pnfs_v3_ds_connect can't load NFSv3
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 3 Jul 2021 18:31:49 +0000 (14:31 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 8 Jul 2021 18:03:26 +0000 (14:03 -0400)
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

index 1c2c0d08614ee7e8b011f5bb0a3e95a0636d3901..cf19914fec817aaefa44923dc95b2fa7771182b3 100644 (file)
@@ -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",