nfs: Update server port after referral or migration
authorChuck Lever <chuck.lever@oracle.com>
Mon, 4 Dec 2017 19:13:46 +0000 (14:13 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 15 Jan 2018 04:06:30 +0000 (23:06 -0500)
After traversing a referral or recovering from a migration event,
ensure that the server port reported in /proc/mounts is updated
to the correct port setting for the new submount.

Reported-by: Helen Chao <helen.chao@oracle.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4client.c

index 507f1f534b164291edf3b71e4868928817a3c219..04612c24d39431b15ff58027a7ebfe7b5450d774 100644 (file)
@@ -861,6 +861,7 @@ static int nfs4_set_client(struct nfs_server *server,
                set_bit(NFS_CS_MIGRATION, &cl_init.init_flags);
        if (test_bit(NFS_MIG_TSM_POSSIBLE, &server->mig_status))
                set_bit(NFS_CS_TSM_POSSIBLE, &cl_init.init_flags);
+       server->port = rpc_get_port(addr);
 
        /* Allocate or find a client reference we can use */
        clp = nfs_get_client(&cl_init);