diff options
| author | Kirk McKusick <mckusick@FreeBSD.org> | 2002-10-25 00:20:37 +0000 |
|---|---|---|
| committer | Kirk McKusick <mckusick@FreeBSD.org> | 2002-10-25 00:20:37 +0000 |
| commit | 9ab73fd11a2bf020a595ce4503b5d54c4645410f (patch) | |
| tree | 3538f027616418c955bda99415bbb0b81e6d64b5 /sys/ufs | |
| parent | 4c40dcd4d76111aa02ef13c63578eafc261fbb47 (diff) | |
Notes
Diffstat (limited to 'sys/ufs')
| -rw-r--r-- | sys/ufs/ffs/ffs_snapshot.c | 5 | ||||
| -rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 1b4efb2f436c..5040cb0521d1 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -307,7 +307,10 @@ restart: */ for (;;) { vn_finished_write(wrtmp); - vfs_write_suspend(vp->v_mount); + if ((error = vfs_write_suspend(vp->v_mount)) != 0) { + vn_start_write(NULL, &wrtmp, V_WAIT); + goto out; + } if (mp->mnt_kern_flag & MNTK_SUSPENDED) break; vn_start_write(NULL, &wrtmp, V_WAIT); diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 76e243e6dee2..b80cd1c4e627 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -184,7 +184,11 @@ ffs_mount(mp, path, data, ndp, td) /* * Flush any dirty data. */ - VFS_SYNC(mp, MNT_WAIT, td->td_proc->p_ucred, td); + if ((error = VFS_SYNC(mp, MNT_WAIT, + td->td_proc->p_ucred, td)) != 0) { + vn_finished_write(mp); + return (error); + } /* * Check for and optionally get rid of files open * for writing. @@ -1156,7 +1160,7 @@ loop: if ((error = softdep_flushworklist(ump->um_mountp, &count, td))) allerror = error; /* Flushed work items may create new vnodes to clean */ - if (count) { + if (allerror == 0 && count) { mtx_lock(&mntvnode_mtx); goto loop; } @@ -1172,7 +1176,7 @@ loop: if ((error = VOP_FSYNC(devvp, cred, waitfor, td)) != 0) allerror = error; VOP_UNLOCK(devvp, 0, td); - if (waitfor == MNT_WAIT) { + if (allerror == 0 && waitfor == MNT_WAIT) { mtx_lock(&mntvnode_mtx); goto loop; } |
