diff options
Diffstat (limited to 'sys/geom/journal/g_journal.c')
-rw-r--r-- | sys/geom/journal/g_journal.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/geom/journal/g_journal.c b/sys/geom/journal/g_journal.c index a31f590..4581430 100644 --- a/sys/geom/journal/g_journal.c +++ b/sys/geom/journal/g_journal.c @@ -2870,7 +2870,7 @@ g_journal_do_switch(struct g_class *classp) struct mount *mp; struct bintime bt; char *mountpoint; - int error, save, vfslocked; + int error, save; DROP_GIANT(); g_topology_lock(); @@ -2922,11 +2922,8 @@ g_journal_do_switch(struct g_class *classp) mountpoint = mp->mnt_stat.f_mntonname; - vfslocked = VFS_LOCK_GIANT(mp); - error = vn_start_write(NULL, &mp, V_WAIT); if (error != 0) { - VFS_UNLOCK_GIANT(vfslocked); GJ_DEBUG(0, "vn_start_write(%s) failed (error=%d).", mountpoint, error); goto next; @@ -2951,10 +2948,8 @@ g_journal_do_switch(struct g_class *classp) vn_finished_write(mp); - if (error != 0) { - VFS_UNLOCK_GIANT(vfslocked); + if (error != 0) goto next; - } /* * Send BIO_FLUSH before freezing the file system, so it can be @@ -2966,7 +2961,6 @@ g_journal_do_switch(struct g_class *classp) GJ_TIMER_START(1, &bt); error = vfs_write_suspend(mp); - VFS_UNLOCK_GIANT(vfslocked); GJ_TIMER_STOP(1, &bt, "Suspend time of %s", mountpoint); if (error != 0) { GJ_DEBUG(0, "Cannot suspend file system %s (error=%d).", |