|author||Konstantin Belousov <kib@FreeBSD.org>||2017-02-09 23:36:50 +0000|
|committer||Konstantin Belousov <kib@FreeBSD.org>||2017-02-09 23:36:50 +0000|
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: svn path=/head/; revision=313496
Diffstat (limited to 'sys/conf')
0 files changed, 0 insertions, 0 deletions