summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfsnode.h
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2005-07-21 22:46:56 +0000
committerps <ps@FreeBSD.org>2005-07-21 22:46:56 +0000
commit3c7af06c7a1c20bf7ef7746f33bfd8f7309e43c0 (patch)
treea908ad2d58843a0c95ec870ea4b7b18c818defb7 /sys/nfsclient/nfsnode.h
parentc0016138302575371346a4f1f21c21640b64ef0e (diff)
downloadFreeBSD-src-3c7af06c7a1c20bf7ef7746f33bfd8f7309e43c0.zip
FreeBSD-src-3c7af06c7a1c20bf7ef7746f33bfd8f7309e43c0.tar.gz
Remove the NFS client rslock. The rslock was used to serialize
writers that want to extend the file. It was also used to serialize readers that might want to read the last block of the file (with a writer extending the file). Now that we support vnode locking for NFS, the rslock is unnecessary. Writers grab the exclusive vnode lock before writing and readers grab the shared (or in some cases the exclusive) lock. Submitted by: Mohan Srinivasan
Diffstat (limited to 'sys/nfsclient/nfsnode.h')
-rw-r--r--sys/nfsclient/nfsnode.h26
1 files changed, 0 insertions, 26 deletions
diff --git a/sys/nfsclient/nfsnode.h b/sys/nfsclient/nfsnode.h
index b9a2caf..0c5817f 100644
--- a/sys/nfsclient/nfsnode.h
+++ b/sys/nfsclient/nfsnode.h
@@ -120,7 +120,6 @@ struct nfsnode {
short n_fhsize; /* size in bytes, of fh */
short n_flag; /* Flag for locking.. */
nfsfh_t n_fh; /* Small File Handle */
- struct lock n_rslock;
struct nfs4_fctx n_rfc;
struct nfs4_fctx n_wfc;
u_char *n_name; /* leaf name, for v4 OPEN op */
@@ -168,31 +167,6 @@ extern struct nfsmount *nfs_iodmount[NFS_MAXASYNCDAEMON];
#if defined(_KERNEL)
-/*
- * nfs_rslock - Attempt to obtain lock on nfsnode
- *
- * Attempt to obtain a lock on the passed nfsnode, returning ENOLCK
- * if the lock could not be obtained due to our having to sleep. This
- * function is generally used to lock around code that modifies an
- * NFS file's size. In order to avoid deadlocks the lock
- * should not be obtained while other locks are being held.
- */
-
-static __inline int
-nfs_rslock(struct nfsnode *np, struct thread *td)
-{
-
- return(lockmgr(&np->n_rslock,
- LK_EXCLUSIVE | LK_CANRECURSE | LK_SLEEPFAIL, NULL, td));
-}
-
-static __inline void
-nfs_rsunlock(struct nfsnode *np, struct thread *td)
-{
-
- (void)lockmgr(&np->n_rslock, LK_RELEASE, NULL, td);
-}
-
extern struct vop_vector nfs_fifoops;
extern struct vop_vector nfs_vnodeops;
extern struct vop_vector nfs4_vnodeops;
OpenPOWER on IntegriCloud