aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/nfs/nfs_var.h
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2009-07-09 19:00:29 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2009-07-09 19:00:29 +0000
commit9ca27b565b9b24a64b55c653fb8ed9eb270278ff (patch)
tree3e2d6d95e472ab780be185fc46a9c7af6affc0de /sys/fs/nfs/nfs_var.h
parent7c6d401c7516fbdc7781c09d0537a0bae3146a1c (diff)
downloadsrc-9ca27b565b9b24a64b55c653fb8ed9eb270278ff.tar.gz
src-9ca27b565b9b24a64b55c653fb8ed9eb270278ff.zip
Since the nfscl_getclose() function both decremented open counts and,
optionally, created a separate list of NFSv4 opens to be closed, it was possible for the associated OpenOwner to be free'd before the Open was closed. The problem was that the Open was taken off the OpenOwner list before the Close RPC was done and OpenOwners can be free'd once the list is empty. This patch separates out the case of doing the Close RPC into a separate function called nfscl_doclose() and simplifies nfsrpc_doclose() so that it closes a single open instead of a list of them. This avoids removing the Open from the OpenOwner list before doing the Close RPC. Approved by: re (kensmith), kib (mentor)
Notes
Notes: svn path=/head/; revision=195510
Diffstat (limited to 'sys/fs/nfs/nfs_var.h')
-rw-r--r--sys/fs/nfs/nfs_var.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h
index 08bcafc4526f..2556e354910e 100644
--- a/sys/fs/nfs/nfs_var.h
+++ b/sys/fs/nfs/nfs_var.h
@@ -457,7 +457,9 @@ void nfscl_initiate_recovery(struct nfsclclient *);
int nfscl_hasexpired(struct nfsclclient *, u_int32_t, NFSPROC_T *);
void nfscl_dumpstate(struct nfsmount *, int, int, int, int);
void nfscl_dupopen(vnode_t, int);
-int nfscl_getclose(vnode_t, struct nfsclclient **, struct nfsclopenhead *);
+int nfscl_getclose(vnode_t, struct nfsclclient **);
+int nfscl_doclose(vnode_t, struct nfsclclient **, NFSPROC_T *);
+void nfsrpc_doclose(struct nfsmount *, struct nfsclopen *, NFSPROC_T *);
int nfscl_deleg(mount_t, struct nfsclclient *, u_int8_t *, int,
struct ucred *, NFSPROC_T *, struct nfscldeleg **);
void nfscl_lockinit(struct nfsv4lock *);