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:
Konstantin Belousov 2016-09-08 12:08:08 +00:00
parent ea16af59a1
commit 76db05eb14
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305598

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);