summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2002-03-14 01:21:13 +0000
committermckusick <mckusick@FreeBSD.org>2002-03-14 01:21:13 +0000
commit670fad8a9e5742598c39cac56f5db02797d0e0c1 (patch)
treec513eddae57a66a172e01a1582fed9096eb59249 /sys/ufs
parenta679e26ad56716183d77d87bfafdd06eb480e518 (diff)
downloadFreeBSD-src-670fad8a9e5742598c39cac56f5db02797d0e0c1.zip
FreeBSD-src-670fad8a9e5742598c39cac56f5db02797d0e0c1.tar.gz
This corrects the first of two known deadlock conditions that
come from the presence of a snapshot file.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_vnops.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index 78c32ea..8f7cd8b 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -140,14 +140,6 @@ ffs_fsync(ap)
int s, error, wait, passes, skipmeta;
daddr_t lbn;
- /*
- * Snapshots have to be unlocked so they do not deadlock
- * checking whether they need to copy their written buffers.
- * We always hold a reference, so they cannot be removed
- * out from underneath us.
- */
- if (ip->i_flags & SF_SNAPSHOT)
- VOP_UNLOCK(vp, 0, ap->a_td);
wait = (ap->a_waitfor == MNT_WAIT);
if (vn_isdisk(vp, NULL)) {
lbn = INT_MAX;
@@ -289,8 +281,5 @@ loop:
}
}
splx(s);
- error = UFS_UPDATE(vp, wait);
- if (ip->i_flags & SF_SNAPSHOT)
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, ap->a_td);
- return (error);
+ return (UFS_UPDATE(vp, wait));
}
OpenPOWER on IntegriCloud