+static void
+zpl_umount_begin(struct super_block *sb)
+{
+ zfs_sb_t *zsb = sb->s_fs_info;
+ int count;
+
+ /*
+ * Best effort to unmount snapshots in .zfs/snapshot/. Normally this
+ * isn't required because snapshots have the MNT_SHRINKABLE flag set.
+ */
+ if (zsb->z_ctldir)
+ (void) zfsctl_unmount_snapshots(zsb, MNT_FORCE, &count);
+}
+