aboutsummaryrefslogtreecommitdiff
path: root/sys/conf
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2017-02-09 23:36:50 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2017-02-09 23:36:50 +0000
commite628e1b919cbfce77767eb2e6e91c917250d09bf (patch)
treefac4de17ae2d5063cf10e9e402d40690eafe4121 /sys/conf
parent7903b00087edb0a0dffeabb04e351c5fa67c5a23 (diff)
downloadsrc-e628e1b919cbfce77767eb2e6e91c917250d09bf.tar.gz
src-e628e1b919cbfce77767eb2e6e91c917250d09bf.zip
Increase a chance of devfs_close() calling d_close cdevsw method.
If a file opened over a vnode has an advisory lock set at close, vn_closefile() acquires additional vnode use reference to prevent freeing the vnode in vn_close(). Side effect is that for device vnodes, devfs_close() sees that vnode reference count is greater than one and refuses to call d_close(). Create internal version of vn_close() which can avoid dropping the vnode reference if needed, and use this to execute VOP_CLOSE() without acquiring a new reference. Note that any parallel reference to the vnode would still prevent d_close call, if the reference is not from an opened file, e.g. due to stat(2). Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=313496
Diffstat (limited to 'sys/conf')
0 files changed, 0 insertions, 0 deletions