Skip to content

Commit

Permalink
ZFS_IOC_RECV should only call zvol_create_minors() on zvols
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Yao <ryao@gentoo.org>
  • Loading branch information
ryao committed Jun 27, 2014
1 parent 6e2f1ce commit 4398c54
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions module/zfs/zfs_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -4037,8 +4037,17 @@ zfs_ioc_recv(zfs_cmd_t *zc)
#endif

#ifdef _KERNEL
if (error == 0)
zvol_create_minors(tofs);
if (error == 0) {
objset_t *os;
boolean_t iszvol;

dmu_objset_hold(tofs, FTAG, &os);
iszvol = (dmu_objset_type(os) == DMU_OST_ZVOL);
dmu_objset_rele(os, FTAG);

if (iszvol)
zvol_create_minors(tofs);
}
#endif

/*
Expand Down

0 comments on commit 4398c54

Please sign in to comment.