HomeFreeBSD

MFC: r350367

Description

MFC: r350367
Lock the vnode before calling ufs_bmap_seekdata().

r346932 replaced a call to vn_bmap_seekhole() with a call to
ufs_bmap_seekdata(). Although vn_bmap_seekhole() locks the vnode,
ufs_bmap_seekdata() assumes it is already locked.
This patch adds locking of the vnode before the ufs_bmap_seekdata() call.
If the vn_lock() call fails, it returns EBADF since that is the normal
error returned when a file system is forced dismounted and is already
listed as an error return in the lseek(2) man page.

Thanks go to Harry Schmalzbauer (freebsd@omnilan.de) for noting that
this MFC was required.

Details

Committed
rmacklemAug 2 2019, 1:59 AM
Parents
rS350527: MFC r350245
Branches
Unknown
Tags
Unknown