From 9e605cf155040f76f3971f056a4410ac8f500fe3 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Mon, 13 Jun 2022 20:30:34 +0000 Subject: [PATCH] spl: Use a clearer name for the user namespace fd 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 Reviewed-by: Allan Jude Signed-off-by: Ryan Moeller Closes #13554 --- module/os/linux/spl/spl-zone.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/os/linux/spl/spl-zone.c b/module/os/linux/spl/spl-zone.c index 804c8010c..b8a8b7cd8 100644 --- a/module/os/linux/spl/spl-zone.c +++ b/module/os/linux/spl/spl-zone.c @@ -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);