All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Christian Brauner <brauner@kernel.org>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>,
	linux-fsdevel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] fs: fix sysctls.c built
Date: Thu, 13 Apr 2023 10:06:35 -0700	[thread overview]
Message-ID: <ZDg2m/U1NasHfK4j@bombadil.infradead.org> (raw)
In-Reply-To: <20230412-sympathie-haltbar-da2d2183067b@brauner>

On Wed, Apr 12, 2023 at 11:19:56AM +0200, Christian Brauner wrote:
> On Tue, Apr 11, 2023 at 12:14:44PM +0800, Kefeng Wang wrote:
> > /proc/sys/fs/overflowuid and overflowgid  will be lost without
> > building this file, kindly ping, any comments, thanks.
> > 
> > 
> > On 2023/3/31 16:45, Kefeng Wang wrote:
> > > 'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=",
> > > or it won't be built as it is overwrited.
> > > 
> > > Fixes: ab171b952c6e ("fs: move namespace sysctls and declare fs base directory")
> > > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> > > ---
> > >   fs/Makefile | 3 +--
> > >   1 file changed, 1 insertion(+), 2 deletions(-)
> > > 
> > > diff --git a/fs/Makefile b/fs/Makefile
> > > index 05f89b5c962f..8d4736fcc766 100644
> > > --- a/fs/Makefile
> > > +++ b/fs/Makefile
> > > @@ -6,7 +6,6 @@
> > >   # Rewritten to use lists instead of if-statements.
> > >   #
> > > -obj-$(CONFIG_SYSCTL)		+= sysctls.o
> > >   obj-y :=	open.o read_write.o file_table.o super.o \
> > >   		char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \
> > > @@ -50,7 +49,7 @@ obj-$(CONFIG_FS_MBCACHE)	+= mbcache.o
> > >   obj-$(CONFIG_FS_POSIX_ACL)	+= posix_acl.o
> > >   obj-$(CONFIG_NFS_COMMON)	+= nfs_common/
> > >   obj-$(CONFIG_COREDUMP)		+= coredump.o
> > > -obj-$(CONFIG_SYSCTL)		+= drop_caches.o
> > > +obj-$(CONFIG_SYSCTL)		+= drop_caches.o sysctls.o
> > >   obj-$(CONFIG_FHANDLE)		+= fhandle.o
> > >   obj-y				+= iomap/
> 
> Given the description in
> ab171b952c6e ("fs: move namespace sysctls and declare fs base directory")
> you probably want to move this earlier.

I was being *way* too cautious and I was wrong, so I'll take Kefang's patch as
I can verify now that order does not matter and his patch is correct.
I've corrected the documentation and clarified this on sysctl-next and
so reflected on linux-next too with these two patches:

sysctl: clarify register_sysctl_init() base directory order
https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=8ae59580f2b0529b6dd1a1cda6b838cfb268cb87

proc_sysctl: move helper which creates required subdirectories
https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=f4c09b14073513efd581459520a01c4c88cb24d7

proc_sysctl: update docs for __register_sysctl_table()
https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=d59d91edd67ec4cef62f26249510fe08b291ae72

proc_sysctl: enhance documentation
https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=eb472aa0678fd03321093bffeb9c7fd7f5035844

And so something we can do eventually is do away with all the base stuff.
For now it's fine, it's not creating an issue.

  Luis

  parent reply	other threads:[~2023-04-13 17:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31  8:45 [PATCH] fs: fix sysctls.c built Kefeng Wang
2023-04-11  4:14 ` Kefeng Wang
2023-04-12  9:19   ` Christian Brauner
2023-04-13  1:34     ` Kefeng Wang
2023-04-13  8:35       ` Christian Brauner
2023-04-13  9:45         ` Kefeng Wang
2023-04-13 12:06           ` Christian Brauner
2023-04-13 17:06     ` Luis Chamberlain [this message]
2023-04-13 18:46       ` Luis Chamberlain
2023-04-13 19:43         ` Luis Chamberlain
2023-04-14  1:19           ` Kefeng Wang

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=ZDg2m/U1NasHfK4j@bombadil.infradead.org \
    --to=mcgrof@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wangkefeng.wang@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.