aboutsummaryrefslogtreecommitdiff
path: root/sys/nfsclient/nfs.h
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2010-01-27 15:22:20 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2010-01-27 15:22:20 +0000
commit651ff543f83c6f5ef243e6aa25c72c84ed7e902f (patch)
treed60068d127fdd1a020342ef14d2b90110e566716 /sys/nfsclient/nfs.h
parent47a933e3df6766d22a724795910740a3b2933b8d (diff)
downloadsrc-651ff543f83c6f5ef243e6aa25c72c84ed7e902f.tar.gz
src-651ff543f83c6f5ef243e6aa25c72c84ed7e902f.zip
Fix a race that can occur when nfs nfsiod threads are being created.
Without this patch it was possible for a different thread that calls nfs_asyncio() to snitch a newly created nfsiod thread that was intended for another caller of nfs_asyncio(), because the nfs_iod_mtx mutex was unlocked while the new nfsiod thread was created. This patch labels the newly created nfsiod, so that it is not taken by another caller of nfs_asyncio(). This is believed to fix the problem reported on the freebsd-stable email list under the subject: FreeBSD NFS client/Linux NFS server issue. Tested by: to DOT my DOT trociny AT gmail DOT com Reviewed by: jhb MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=203072
Diffstat (limited to 'sys/nfsclient/nfs.h')
-rw-r--r--sys/nfsclient/nfs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs.h b/sys/nfsclient/nfs.h
index 18eae3bae743..6f6e0d33ad50 100644
--- a/sys/nfsclient/nfs.h
+++ b/sys/nfsclient/nfs.h
@@ -252,7 +252,7 @@ int nfs_writerpc(struct vnode *, struct uio *, struct ucred *, int *,
int nfs_commit(struct vnode *vp, u_quad_t offset, int cnt,
struct ucred *cred, struct thread *td);
int nfs_readdirrpc(struct vnode *, struct uio *, struct ucred *);
-int nfs_nfsiodnew(void);
+int nfs_nfsiodnew(int);
int nfs_asyncio(struct nfsmount *, struct buf *, struct ucred *, struct thread *);
int nfs_doio(struct vnode *, struct buf *, struct ucred *, struct thread *);
void nfs_doio_directwrite (struct buf *);