]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add dev_strategy_csw() function, which is similar to dev_strategy()
authorKonstantin Belousov <kib@FreeBSD.org>
Wed, 27 Mar 2013 11:34:27 +0000 (11:34 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Wed, 27 Mar 2013 11:34:27 +0000 (11:34 +0000)
commitd1e99f43ed24380668515e087f9ab2529519b93d
tree036654e19fbde1423bfd8d644566101fc38a8e7b
parent88c8c0a70f1e4441c3911a0428f1f25a50779cd4
Add dev_strategy_csw() function, which is similar to dev_strategy()
but assumes that a thread reference was already obtained on the passed
device.  Use the function from physio(), to avoid two extra dev_mtx
lock and unlock.  Note that physio() is always used as the cdevsw
method, or is called from a cdevsw method, and the caller already owns
the reference.

dev_strategy() is left to keep KPI intact, but now it is implemented
as a wrapper around dev_strategy_csw().

Do some style cleanup in physio().

Requested and reviewed by: kan (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
sys/kern/kern_physio.c
sys/kern/vfs_bio.c
sys/sys/conf.h