diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2009-09-08 14:43:42 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2009-09-08 14:43:42 +0000 |
| commit | c02280f542426eaeaa33d9ed8ba8e23967d04e8a (patch) | |
| tree | df20a5df45092ae19f23de912dfa19fd7f340445 /sys | |
| parent | d53c6c91b15033c65faf75cecabfd5c853a13614 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/kern/vfs_vnops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index f67064613e06..1b77352b1c6a 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -999,7 +999,8 @@ vn_start_write(vp, mpp, flags) goto unlock; mp->mnt_writeopcount++; unlock: - MNT_REL(mp); + if (error != 0 || (flags & V_XSLEEP) != 0) + MNT_REL(mp); MNT_IUNLOCK(mp); return (error); } @@ -1049,7 +1050,6 @@ vn_start_secondary_write(vp, mpp, flags) if ((mp->mnt_kern_flag & (MNTK_SUSPENDED | MNTK_SUSPEND2)) == 0) { mp->mnt_secondary_writes++; mp->mnt_secondary_accwrites++; - MNT_REL(mp); MNT_IUNLOCK(mp); return (0); } @@ -1081,6 +1081,7 @@ vn_finished_write(mp) if (mp == NULL) return; MNT_ILOCK(mp); + MNT_REL(mp); mp->mnt_writeopcount--; if (mp->mnt_writeopcount < 0) panic("vn_finished_write: neg cnt"); @@ -1103,6 +1104,7 @@ vn_finished_secondary_write(mp) if (mp == NULL) return; MNT_ILOCK(mp); + MNT_REL(mp); mp->mnt_secondary_writes--; if (mp->mnt_secondary_writes < 0) panic("vn_finished_secondary_write: neg cnt"); |
