diff options
author | luoqi <luoqi@FreeBSD.org> | 1998-09-24 15:02:46 +0000 |
---|---|---|
committer | luoqi <luoqi@FreeBSD.org> | 1998-09-24 15:02:46 +0000 |
commit | 10b871784989ebe6bac8297b1c4e59a331f45854 (patch) | |
tree | 7a64a8392bf41b5cb155b40d4e9f7ca98001b89a /sys/ufs | |
parent | b9b9de1a625de23d5df1a400dc7282ea693f1ce8 (diff) | |
download | FreeBSD-src-10b871784989ebe6bac8297b1c4e59a331f45854.zip FreeBSD-src-10b871784989ebe6bac8297b1c4e59a331f45854.tar.gz |
Eliminate a race in VOP_FSYNC() when softupdates is enabled.
Submitted by: Kirk McKusick <mckusick@McKusick.COM>
Two minor changes are also included,
1. Remove gratuitious checks for error return from vn_lock with LK_RETRY set,
vn_lock should always succeed in these cases.
2. Back out change rev. 1.36->1.37, which unnecessarily makes async mount
a little more unstable. It also keeps us in sync with other BSDs.
Suggested by: Bruce Evans <bde@zeta.org.au>
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 3 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vnops.c | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 72104c7..83a4fa8 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -54,7 +54,7 @@ * SUCH DAMAGE. * * from: @(#)ffs_softdep.c 9.28 (McKusick) 8/8/98 - * $Id: ffs_softdep.c,v 1.12 1998/06/12 21:21:26 julian Exp $ + * $Id: ffs_softdep.c,v 1.13 1998/08/12 20:46:47 julian Exp $ */ /* @@ -209,6 +209,7 @@ struct bio_ops bioops = { softdep_disk_io_initiation, /* io_start */ softdep_disk_write_complete, /* io_complete */ softdep_deallocate_dependencies, /* io_deallocate */ + softdep_fsync, /* io_fsync */ softdep_process_worklist, /* io_sync */ }; diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index b2fe80f..093c625 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_vnops.c 8.15 (Berkeley) 5/14/95 - * $Id: ffs_vnops.c,v 1.50 1998/06/10 19:27:56 julian Exp $ + * $Id: ffs_vnops.c,v 1.51 1998/09/07 11:50:19 bde Exp $ */ #include <sys/param.h> @@ -249,9 +249,5 @@ loop2: } splx(s); getmicrotime(&tv); - if ((error = UFS_UPDATE(vp, &tv, &tv, ap->a_waitfor == MNT_WAIT)) != 0) - return (error); - if (DOINGSOFTDEP(vp) && ap->a_waitfor == MNT_WAIT) - error = softdep_fsync(vp); - return (error); + return (UFS_UPDATE(vp, &tv, &tv, ap->a_waitfor == MNT_WAIT)); } |