mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Fix minor issues in namespace delegation support
get_user_ns() is only done once for each namespace, so put_user_ns() should be done once too. Fix two typos in user_namespace/user_namespace_002.ksh and user_namespace/user_namespace_003.ksh. Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Youzhong Yang <yyang@mathworks.com> Closes #13918
This commit is contained in:
parent
fbf874a4ac
commit
62e2a2881f
@ -415,8 +415,8 @@ spl_zone_fini(void)
|
|||||||
zone_dataset_t, zd_list);
|
zone_dataset_t, zd_list);
|
||||||
list_del(&zd->zd_list);
|
list_del(&zd->zd_list);
|
||||||
kmem_free(zd, sizeof (*zd) + zd->zd_dsnamelen + 1);
|
kmem_free(zd, sizeof (*zd) + zd->zd_dsnamelen + 1);
|
||||||
put_user_ns(zds->zds_userns);
|
|
||||||
}
|
}
|
||||||
|
put_user_ns(zds->zds_userns);
|
||||||
list_del(&zds->zds_list);
|
list_del(&zds->zds_list);
|
||||||
kmem_free(zds, sizeof (*zds));
|
kmem_free(zds, sizeof (*zds));
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ fi
|
|||||||
list="$($NSENTER zfs list -r -H -o name | tr '\n' ' ')"
|
list="$($NSENTER zfs list -r -H -o name | tr '\n' ' ')"
|
||||||
log_must test -z "$list"
|
log_must test -z "$list"
|
||||||
log_must zfs zone $proc_ns $TESTPOOL/userns
|
log_must zfs zone $proc_ns $TESTPOOL/userns
|
||||||
proc_ns_added="$ns"
|
proc_ns_added="$proc_ns"
|
||||||
|
|
||||||
# 2. 'zfs list'
|
# 2. 'zfs list'
|
||||||
list="$($NSENTER zfs list -r -H -o name $TESTPOOL | tr '\n' ' ')"
|
list="$($NSENTER zfs list -r -H -o name $TESTPOOL | tr '\n' ' ')"
|
||||||
|
@ -88,7 +88,7 @@ list="$($NSENTER zfs list -r -H -o name | tr '\n' ' ')"
|
|||||||
log_must test -z "$list"
|
log_must test -z "$list"
|
||||||
log_must zfs zone $proc_ns $TESTPOOL/userns
|
log_must zfs zone $proc_ns $TESTPOOL/userns
|
||||||
log_must zfs zone $proc_ns $TESTPOOL/otheruserns
|
log_must zfs zone $proc_ns $TESTPOOL/otheruserns
|
||||||
proc_ns_added="$ns"
|
proc_ns_added="$proc_ns"
|
||||||
|
|
||||||
# 2. 'zfs list'
|
# 2. 'zfs list'
|
||||||
list="$($NSENTER zfs list -r -H -o name $TESTPOOL | tr '\n' ' ')"
|
list="$($NSENTER zfs list -r -H -o name $TESTPOOL | tr '\n' ' ')"
|
||||||
|
Loading…
Reference in New Issue
Block a user