]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
When cleaning up from failed adv locking and checking for write, do
authorkib <kib@FreeBSD.org>
Sun, 17 Jan 2016 08:40:51 +0000 (08:40 +0000)
committerkib <kib@FreeBSD.org>
Sun, 17 Jan 2016 08:40:51 +0000 (08:40 +0000)
commit7d0828c94e6533f7d0d139b0242cf16e417eab8b
tree16b9eb6d93a01d3b7c2e3468655dd69e5581a46d
parent32d7f352350a4193427528a4019067af0c735a0b
When cleaning up from failed adv locking and checking for write, do
not call VOP_CLOSE() manually.  Instead, delegate the close to
fo_close() performed as part of the fdrop() on the file failed to
open.  For this, finish constructing file on error, in particular, set
f_vnode and f_ops.

Forcibly resetting f_ops to badfileops disabled additional cleanups
performed by fo_close() for some file types, in this case it was noted
that cdevpriv data was corrupted.  Since fo_close() call must be
enabled for some file types, it makes more sense to enable it for all
files opened through vn_open_cred().

In collaboration with: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
sys/kern/vfs_vnops.c
sys/sys/fcntl.h