Re: [PATCH] fs: unicode: Add utf8-data module
From: Eric Biggers
Date: Sat Aug 07 2021 - 12:56:06 EST
On Fri, Jul 30, 2021 at 06:13:33PM +0530, Shreeya Patel wrote:
> diff --git a/fs/unicode/utf8n.h b/fs/unicode/utf8n.h
> index 0acd530c2c79..6843229bcb2b 100644
> --- a/fs/unicode/utf8n.h
> +++ b/fs/unicode/utf8n.h
> @@ -11,6 +11,7 @@
> #include <linux/export.h>
> #include <linux/string.h>
> #include <linux/module.h>
> +#include <linux/spinlock.h>
>
> /* Encoding a unicode version number as a single unsigned int. */
> #define UNICODE_MAJ_SHIFT (16)
> @@ -21,6 +22,11 @@
> ((unsigned int)(MIN) << UNICODE_MIN_SHIFT) | \
> ((unsigned int)(REV)))
>
> +extern spinlock_t utf8_lock;
> +
> +extern struct utf8_data *utf8_ops;
> +extern bool utf8data_loaded;
The 'utf8data_loaded' variable is unnecessary, since it's equivalent to
'utf8_ops != NULL'.
Also, there are no function pointer fields anymore, so this really should be
called utf8_data, not utf8_ops.
- Eric