Skip to content

Commit

Permalink
zfs_unmount_snap() should return 0 if the snapshot it's passed is not a
Browse files Browse the repository at this point in the history
snapshot.  Detect this indirectly by testing zsb as set by zfs_sb_hold().
This will normally happen in the case of deleting a zvol's snapshot.
  • Loading branch information
dweeezil committed Oct 16, 2013
1 parent 29b2094 commit fdffb9e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions module/zfs/zfs_ioctl.c
Expand Up @@ -3370,6 +3370,10 @@ zfs_unmount_snap(const char *snapname)
fullname = strdup(snapname);

err = zfs_sb_hold(dsname, FTAG, &zsb, B_FALSE);
if (zsb == NULL) {
err = 0;
goto out;
}
if (err != 0)
goto out;

Expand Down

0 comments on commit fdffb9e

Please sign in to comment.