aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/devfs
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2019-10-05 17:44:33 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2019-10-05 17:44:33 +0000
commitdfa8dae4932d8677497190089d163b88d5289ea2 (patch)
tree1f2156bb8e3050fd6cffd87036fb8c0779780b91 /sys/fs/devfs
parentc36e2d14ac53be1ae738e2377641c4b61985077f (diff)
downloadsrc-dfa8dae4932d8677497190089d163b88d5289ea2.tar.gz
src-dfa8dae4932d8677497190089d163b88d5289ea2.zip
devfs: plug redundant bwillwrite avoidance
vn_write already checks for vnode type to see if bwillwrite should be called. This effectively reverts r244643. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21905
Notes
Notes: svn path=/head/; revision=353126
Diffstat (limited to 'sys/fs/devfs')
-rw-r--r--sys/fs/devfs/devfs_vnops.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index ab6e7e13b8ba..3b80c68e3091 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -1137,7 +1137,6 @@ devfs_open(struct vop_open_args *ap)
int error, ref, vlocked;
struct cdevsw *dsw;
struct file *fpop;
- struct mtx *mtxp;
if (vp->v_type == VBLK)
return (ENXIO);
@@ -1191,16 +1190,6 @@ devfs_open(struct vop_open_args *ap)
#endif
if (fp->f_ops == &badfileops)
finit(fp, fp->f_flag, DTYPE_VNODE, dev, &devfs_ops_f);
- mtxp = mtx_pool_find(mtxpool_sleep, fp);
-
- /*
- * Hint to the dofilewrite() to not force the buffer draining
- * on the writer to the file. Most likely, the write would
- * not need normal buffers.
- */
- mtx_lock(mtxp);
- fp->f_vnread_flags |= FDEVFS_VNODE;
- mtx_unlock(mtxp);
return (error);
}