--- - branch: MAIN date: Mon Mar 28 12:34:34 UTC 2022 files: - new: '1.187' old: '1.186' path: src/sys/miscfs/specfs/spec_vnops.c pathrev: src/sys/miscfs/specfs/spec_vnops.c@1.187 type: modified id: 20220328T123434Z.f046ab696592edf25e1fd307552b7f090cca2f50 log: | specfs: Call bdev_open without the vnode lock. There is no need for it to serialize opens, because they are already serialized by sd_opencnt which for block devices is always either 0 or 1. There's not obviously any other reason why the vnode lock should be held across bdev_open, other than that it might be nice to avoid dropping it if not necessary. For character devices we always have to drop the vnode lock because open might hang indefinitely, when opening a tty, which is not allowed while holding the vnode lock. module: src subject: 'CVS commit: src/sys/miscfs/specfs' unixtime: '1648470874' user: riastradh