[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3386dc35-3ed1-4aab-abd2-42adfa25ddd9@igalia.com>
Date: Thu, 31 Oct 2024 16:11:39 -0300
From: André Almeida <andrealmeid@...lia.com>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Gabriel Krisman Bertazi <krisman@...nel.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
Theodore Ts'o <tytso@....edu>, Andreas Dilger <adilger.kernel@...ger.ca>,
Hugh Dickins <hughd@...gle.com>, Andrew Morton <akpm@...ux-foundation.org>,
Jonathan Corbet <corbet@....net>, smcv@...labora.com, kernel-dev@...lia.com,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-ext4@...r.kernel.org, linux-mm@...ck.org, linux-doc@...r.kernel.org,
Gabriel Krisman Bertazi <krisman@...e.de>, llvm@...ts.linux.dev,
linux-btrfs@...r.kernel.org, Chris Mason <clm@...com>
Subject: Re: [PATCH v8 8/9] tmpfs: Expose filesystem features via sysfs
Em 31/10/2024 14:31, André Almeida escreveu:
> Hi Nathan,
>
> Em 31/10/2024 02:18, Nathan Chancellor escreveu:
>> Hi André,
>>
[...]
>> If there is any patch I can test or further information I can provide, I
>> am more than happy to do so.
>>
I found the issue, was just the DEVICE_ macro that I wasn't supposed to
use inside of tmpfs, this diff solved the error for me, I will send a
proper patch in a moment:
-- >8 --
diff --git a/mm/shmem.c b/mm/shmem.c
index 971e6f1184a5..db52c34d5020 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -5551,12 +5551,21 @@ EXPORT_SYMBOL_GPL(shmem_read_mapping_page_gfp);
#if defined(CONFIG_SYSFS) && defined(CONFIG_TMPFS)
#if IS_ENABLED(CONFIG_UNICODE)
-static DEVICE_STRING_ATTR_RO(casefold, 0444, "supported");
+static ssize_t casefold_show(struct kobject *kobj, struct
kobj_attribute *a,
+ char *buf)
+{
+ return sysfs_emit(buf, "supported\n");
+}
+static struct kobj_attribute tmpfs_attr_casefold = {
+ .attr = { .name = "casefold", .mode = 0444 },
+ .show = casefold_show,
+ .store = NULL,
+};
#endif
static struct attribute *tmpfs_attributes[] = {
#if IS_ENABLED(CONFIG_UNICODE)
- &dev_attr_casefold.attr.attr,
+ &tmpfs_attr_casefold.attr,
#endif
NULL
};
Powered by blists - more mailing lists