summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_socket.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-02-13 00:04:58 +0000
committerjhb <jhb@FreeBSD.org>2008-02-13 00:04:58 +0000
commite83bd487c4e08b9525923b1cfb1870fb16b86535 (patch)
tree0ef5649ac7717cfb42b956a31f3b920f3f25680c /sys/nfsclient/nfs_socket.c
parent06a30b50ee14d137e2cf4755c15388c7e21ef5ed (diff)
downloadFreeBSD-src-e83bd487c4e08b9525923b1cfb1870fb16b86535.zip
FreeBSD-src-e83bd487c4e08b9525923b1cfb1870fb16b86535.tar.gz
Consolidate the code to generate a new XID for a NFS request into a
nfs_xid_gen() function instead of duplicating the logic in both nfsm_rpchead() and the NFS3ERR_JUKEBOX handling in nfs_request(). MFC after: 1 week Submitted by: mohans (a long while ago)
Diffstat (limited to 'sys/nfsclient/nfs_socket.c')
-rw-r--r--sys/nfsclient/nfs_socket.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c
index 9edd157..3975577 100644
--- a/sys/nfsclient/nfs_socket.c
+++ b/sys/nfsclient/nfs_socket.c
@@ -77,9 +77,6 @@ __FBSDID("$FreeBSD$");
#define TRUE 1
#define FALSE 0
-extern u_int32_t nfs_xid;
-extern struct mtx nfs_xid_mtx;
-
static int nfs_realign_test;
static int nfs_realign_count;
static int nfs_bufpackets = 4;
@@ -1351,11 +1348,7 @@ wait_for_pinned_req:
while (time_second < waituntil) {
(void) tsleep(&lbolt, PSOCK, "nqnfstry", 0);
}
- mtx_lock(&nfs_xid_mtx);
- if (++nfs_xid == 0)
- nfs_xid++;
- rep->r_xid = *xidp = txdr_unsigned(nfs_xid);
- mtx_unlock(&nfs_xid_mtx);
+ rep->r_xid = *xidp = txdr_unsigned(nfs_xid_gen());
goto tryagain;
}
OpenPOWER on IntegriCloud