mirror of
https://github.com/opnsense/src.git
synced 2026-03-28 13:43:12 -04:00
nfscl: Move release of the clientID lock into nfscl_doclose()
This patch moves release of the shared clientID lock from nfsrpc_close() just after the nfscl_doclose() call to the end of nfscl_doclose() call. This does make the code cleaner, since the shared lock is acquired at the beginning of nfscl_doclose(). The only semantics change is that the code no longer drops and reaquires the NFSCLSTATELOCK() mutex, which I do not believe will have a negative effect on the NFSv4 client. This is being done to prepare the code for a future patch that fixes the case where an NFSv4.1/4.2 server replies NFSERR_DELAY to a Close operation. MFC after: 2 week
This commit is contained in:
parent
79239b5b47
commit
e2aab5e2d7
2 changed files with 6 additions and 6 deletions
|
|
@ -749,13 +749,12 @@ nfsrpc_close(vnode_t vp, int doclose, NFSPROC_T *p)
|
|||
return (0);
|
||||
if (doclose)
|
||||
error = nfscl_doclose(vp, &clp, p);
|
||||
else
|
||||
else {
|
||||
error = nfscl_getclose(vp, &clp);
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
nfscl_clientrelease(clp);
|
||||
return (0);
|
||||
if (error == 0)
|
||||
nfscl_clientrelease(clp);
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -3381,6 +3381,7 @@ lookformore:
|
|||
goto lookformore;
|
||||
}
|
||||
}
|
||||
nfscl_clrelease(clp);
|
||||
NFSUNLOCKCLSTATE();
|
||||
/*
|
||||
* recallp has been set NULL by nfscl_retoncloselayout() if it was
|
||||
|
|
|
|||
Loading…
Reference in a new issue