summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index adfb41b..8557edc 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -424,6 +424,15 @@ loop:
MNT_ILOCK(mp);
continue;
}
+ /*
+ * We can skip parent directory vnode because it must have
+ * this snapshot file in it.
+ */
+ if (xvp == nd.ni_dvp) {
+ VI_UNLOCK(xvp);
+ MNT_ILOCK(mp);
+ continue;
+ }
if (vn_lock(xvp, LK_EXCLUSIVE | LK_INTERLOCK, td) != 0) {
MNT_ILOCK(mp);
goto loop;
OpenPOWER on IntegriCloud