aboutsummaryrefslogtreecommitdiff
path: root/sys/ufs/ffs/ffs_snapshot.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/ufs/ffs/ffs_snapshot.c')
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index b5daec14decf..72c8061917d8 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -2595,6 +2595,7 @@ process_deferred_inactive(struct mount *mp)
continue;
}
vholdl(vp);
+retry_vnode:
error = vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK);
if (error != 0) {
vdrop(vp);
@@ -2609,7 +2610,12 @@ process_deferred_inactive(struct mount *mp)
UFS_INODE_SET_FLAG(ip, IN_MODIFIED);
}
VI_LOCK(vp);
- vinactive(vp);
+ error = vinactive(vp);
+ if (error == ERELOOKUP && vp->v_usecount == 0) {
+ VI_UNLOCK(vp);
+ VOP_UNLOCK(vp);
+ goto retry_vnode;
+ }
VI_UNLOCK(vp);
VOP_UNLOCK(vp);
vdrop(vp);