When logging unlikely UFS_TRUNCATE() failure in ufs_direnter(),

include error code.

Reported and tested by:	pho
Reviewed by:	mckusick
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
This commit is contained in:
kib 2016-09-08 12:08:08 +00:00
parent 666d76bef3
commit 835bb1130c

View File

@ -1124,7 +1124,8 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp, isrename)
error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff,
IO_NORMAL | (DOINGASYNC(dvp) ? 0 : IO_SYNC), cr);
if (error != 0)
vn_printf(dvp, "ufs_direnter: failed to truncate ");
vn_printf(dvp, "ufs_direnter: failed to truncate "
"err %d", error);
#ifdef UFS_DIRHASH
if (error == 0 && dp->i_dirhash != NULL)
ufsdirhash_dirtrunc(dp, dp->i_endoff);