summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2017-04-13 08:21:29 +0000
committerkib <kib@FreeBSD.org>2017-04-13 08:21:29 +0000
commit853152d60fdc6fb0fa20ef31e13ee1e25f947840 (patch)
treed72a49b847490c2fd427c978eaed179335da6a93
parente18e2af432b38b3c386e247d77c5ad1455e8afe0 (diff)
downloadFreeBSD-src-853152d60fdc6fb0fa20ef31e13ee1e25f947840.zip
FreeBSD-src-853152d60fdc6fb0fa20ef31e13ee1e25f947840.tar.gz
MFC r316566:
Remove spl*() calls from the nfsclient code.
-rw-r--r--sys/fs/nfsclient/nfs_clbio.c4
-rw-r--r--sys/fs/nfsclient/nfs_clvfsops.c9
-rw-r--r--sys/fs/nfsclient/nfs_clvnops.c32
3 files changed, 10 insertions, 35 deletions
diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c
index 2649d95..7217968 100644
--- a/sys/fs/nfsclient/nfs_clbio.c
+++ b/sys/fs/nfsclient/nfs_clbio.c
@@ -1816,9 +1816,6 @@ ncl_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td,
*/
if (error == EINTR || error == EIO || error == ETIMEDOUT
|| (!error && (bp->b_flags & B_NEEDCOMMIT))) {
- int s;
-
- s = splbio();
bp->b_flags &= ~(B_INVAL|B_NOCACHE);
if ((bp->b_flags & B_PAGING) == 0) {
bdirty(bp);
@@ -1827,7 +1824,6 @@ ncl_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td,
if ((error == EINTR || error == ETIMEDOUT) &&
(bp->b_flags & B_ASYNC) == 0)
bp->b_flags |= B_EINTR;
- splx(s);
} else {
if (error) {
bp->b_ioflags |= BIO_ERROR;
diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c
index 3c18663..5e628f2 100644
--- a/sys/fs/nfsclient/nfs_clvfsops.c
+++ b/sys/fs/nfsclient/nfs_clvfsops.c
@@ -415,11 +415,6 @@ nfs_mountroot(struct mount *mp)
nfs_convert_diskless();
/*
- * XXX splnet, so networks will receive...
- */
- splnet();
-
- /*
* Do enough of ifconfig(8) so that the critical net interface can
* talk to the server.
*/
@@ -558,12 +553,9 @@ static void
nfs_decode_args(struct mount *mp, struct nfsmount *nmp, struct nfs_args *argp,
const char *hostname, struct ucred *cred, struct thread *td)
{
- int s;
int adjsock;
char *p;
- s = splnet();
-
/*
* Set read-only flag if requested; otherwise, clear it if this is
* an update. If this is not an update, then either the read-only
@@ -609,7 +601,6 @@ nfs_decode_args(struct mount *mp, struct nfsmount *nmp, struct nfs_args *argp,
/* Update flags atomically. Don't change the lock bits. */
nmp->nm_flag = argp->flags | nmp->nm_flag;
- splx(s);
if ((argp->flags & NFSMNT_TIMEO) && argp->timeo > 0) {
nmp->nm_timeo = (argp->timeo * NFS_HZ + 5) / 10;
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
index 663c4f4..b7c06ea 100644
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -3150,27 +3150,21 @@ nfs_print(struct vop_print_args *ap)
int
ncl_writebp(struct buf *bp, int force __unused, struct thread *td)
{
- int s;
- int oldflags = bp->b_flags;
-#if 0
- int retv = 1;
- off_t off;
-#endif
+ int oldflags, rtval;
BUF_ASSERT_HELD(bp);
if (bp->b_flags & B_INVAL) {
brelse(bp);
- return(0);
+ return (0);
}
+ oldflags = bp->b_flags;
bp->b_flags |= B_CACHE;
/*
* Undirty the bp. We will redirty it later if the I/O fails.
*/
-
- s = splbio();
bundirty(bp);
bp->b_flags &= ~B_DONE;
bp->b_ioflags &= ~BIO_ERROR;
@@ -3178,7 +3172,6 @@ ncl_writebp(struct buf *bp, int force __unused, struct thread *td)
bufobj_wref(bp->b_bufobj);
curthread->td_ru.ru_oublock++;
- splx(s);
/*
* Note: to avoid loopback deadlocks, we do not
@@ -3190,19 +3183,14 @@ ncl_writebp(struct buf *bp, int force __unused, struct thread *td)
bp->b_iooffset = dbtob(bp->b_blkno);
bstrategy(bp);
- if( (oldflags & B_ASYNC) == 0) {
- int rtval = bufwait(bp);
-
- if (oldflags & B_DELWRI) {
- s = splbio();
- reassignbuf(bp);
- splx(s);
- }
- brelse(bp);
- return (rtval);
- }
+ if ((oldflags & B_ASYNC) != 0)
+ return (0);
- return (0);
+ rtval = bufwait(bp);
+ if (oldflags & B_DELWRI)
+ reassignbuf(bp);
+ brelse(bp);
+ return (rtval);
}
/*
OpenPOWER on IntegriCloud