Fix mount reference leak when V_XSLEEP is specified to vn_start_write().

Submitted by:	tegge
This commit is contained in:
Konstantin Belousov 2009-09-01 12:05:39 +00:00
parent 8a945d109c
commit 579b976090
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196733

View file

@ -999,7 +999,7 @@ vn_start_write(vp, mpp, flags)
goto unlock;
mp->mnt_writeopcount++;
unlock:
if (error != 0)
if (error != 0 || (flags & V_XSLEEP) != 0)
MNT_REL(mp);
MNT_IUNLOCK(mp);
return (error);