]> git.proxmox.com Git - mirror_zfs.git/commitdiff
spl: Use a clearer name for the user namespace fd
authorRyan Moeller <freqlabs@FreeBSD.org>
Mon, 13 Jun 2022 20:30:34 +0000 (20:30 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 14 Jun 2022 15:14:19 +0000 (08:14 -0700)
This fd has nothing to do with cleanup, that's just the name of the
field in zfs_cmd_t that was used to pass it to the kernel.

Call it what it is, an fd for a user namespace.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
Closes #13554

module/os/linux/spl/spl-zone.c

index 804c8010ccef4f784fac1e575525bc7729a8be8a..b8a8b7cd8cd869237757ffcbfa0726364efeca29 100644 (file)
@@ -164,7 +164,7 @@ zone_dataset_name_check(const char *dataset, size_t *dsnamelen)
 }
 
 int
-zone_dataset_attach(cred_t *cred, const char *dataset, int cleanup_fd)
+zone_dataset_attach(cred_t *cred, const char *dataset, int userns_fd)
 {
 #if defined(CONFIG_USER_NS) && defined(HAVE_USER_NS_COMMON_INUM)
        struct user_namespace *userns;
@@ -177,7 +177,7 @@ zone_dataset_attach(cred_t *cred, const char *dataset, int cleanup_fd)
                return (error);
        if ((error = zone_dataset_name_check(dataset, &dsnamelen)) != 0)
                return (error);
-       if ((error = user_ns_get(cleanup_fd, &userns)) != 0)
+       if ((error = user_ns_get(userns_fd, &userns)) != 0)
                return (error);
 
        mutex_enter(&zone_datasets_lock);
@@ -217,7 +217,7 @@ zone_dataset_attach(cred_t *cred, const char *dataset, int cleanup_fd)
 EXPORT_SYMBOL(zone_dataset_attach);
 
 int
-zone_dataset_detach(cred_t *cred, const char *dataset, int cleanup_fd)
+zone_dataset_detach(cred_t *cred, const char *dataset, int userns_fd)
 {
 #if defined(CONFIG_USER_NS) && defined(HAVE_USER_NS_COMMON_INUM)
        struct user_namespace *userns;
@@ -230,7 +230,7 @@ zone_dataset_detach(cred_t *cred, const char *dataset, int cleanup_fd)
                return (error);
        if ((error = zone_dataset_name_check(dataset, &dsnamelen)) != 0)
                return (error);
-       if ((error = user_ns_get(cleanup_fd, &userns)) != 0)
+       if ((error = user_ns_get(userns_fd, &userns)) != 0)
                return (error);
 
        mutex_enter(&zone_datasets_lock);