freebsd-skq/sys/ufs
rmacklem 577fca0e20 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.

Discussed with:	markj
Reviewed by:	kib
2019-07-27 01:52:34 +00:00
..
ffs The error reported in FS-14-UFS-3 can only happen on UFS/FFS 2019-07-17 22:07:43 +00:00
ufs Lock the vnode before calling ufs_bmap_seekdata(). 2019-07-27 01:52:34 +00:00