From: David Howells <dhowells@redhat.com>
To: Paulo Alcantara <pc@manguebit.com>
Cc: dhowells@redhat.com, Song Liu <song@kernel.org>,
netfs@lists.linux.dev, linux-fsdevel@vger.kernel.org,
kernel-team@fb.com
Subject: Re: [PATCH] netfs: Let netfs depends on PROC_FS
Date: Tue, 08 Apr 2025 08:31:50 +0100 [thread overview]
Message-ID: <1478622.1744097510@warthog.procyon.org.uk> (raw)
In-Reply-To: <b395436343d8df2efdebb737580fe976@manguebit.com>
Paulo Alcantara <pc@manguebit.com> wrote:
> It wouldn't make sense to make it depend on PROC_FS.
Correct.
> I see two problems here:
>
> (1) We shouldn't be creating /proc/fs/netfs if CONFIG_PROC_FS=n
Yes, the proc_*() calls will all fail if CONFIG_PROC_FS=n and so need to be
#ifdef'd around.
> (2) There's a wrong assumption in the API that @netfs_request_pool and
> @netfs_subrequest_pool will always be initialized. For example, we
> should return an error from netfs_alloc_[sub]rquest() functions in case
> @mempool == NULL.
No. The assumption is correct. The problem is that if the module is built in
(ie. CONFIG_NETFS_SUPPORT=y), then there is no consequence of netfs_init()
failing - and fail it does if CONFIG_PROC_FS=n - and 9p, afs and cifs will
call into it anyway, despite the fact it deinitialised itself.
It should marked be module_init(), not fs_initcall().
David
next prev parent reply other threads:[~2025-04-08 7:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 18:47 [PATCH] netfs: Let netfs depends on PROC_FS Song Liu
2025-04-07 19:18 ` Paulo Alcantara
[not found] ` <notmuch-sha1-7bf7bb81673494d9bbe96c6cfbeaf9005a6bd491>
2025-04-08 0:51 ` Paulo Alcantara
2025-04-08 7:31 ` David Howells [this message]
2025-04-08 15:05 ` Paulo Alcantara
2025-04-08 16:14 ` Song Liu
2025-04-09 11:56 ` David Howells
2025-04-09 15:03 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1478622.1744097510@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=kernel-team@fb.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=netfs@lists.linux.dev \
--cc=pc@manguebit.com \
--cc=song@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox