linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs: unexport ioctl_getflags
@ 2025-11-18  7:09 Christoph Hellwig
  2025-11-18 10:48 ` Johannes Thumshirn
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Christoph Hellwig @ 2025-11-18  7:09 UTC (permalink / raw)
  To: brauner, viro; +Cc: jack, linux-fsdevel

No modular users, nor should there be any for a dispatcher like this.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/file_attr.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/file_attr.c b/fs/file_attr.c
index 1dcec88c0680..63d62742fbb1 100644
--- a/fs/file_attr.c
+++ b/fs/file_attr.c
@@ -316,7 +316,6 @@ int ioctl_getflags(struct file *file, unsigned int __user *argp)
 		err = put_user(fa.flags, argp);
 	return err;
 }
-EXPORT_SYMBOL(ioctl_getflags);
 
 int ioctl_setflags(struct file *file, unsigned int __user *argp)
 {
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] fs: unexport ioctl_getflags
  2025-11-18  7:09 [PATCH] fs: unexport ioctl_getflags Christoph Hellwig
@ 2025-11-18 10:48 ` Johannes Thumshirn
  2025-11-18 15:59 ` Darrick J. Wong
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Johannes Thumshirn @ 2025-11-18 10:48 UTC (permalink / raw)
  To: hch, brauner@kernel.org, viro@zeniv.linux.org.uk
  Cc: jack@suse.cz, linux-fsdevel@vger.kernel.org

Looks good,

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fs: unexport ioctl_getflags
  2025-11-18  7:09 [PATCH] fs: unexport ioctl_getflags Christoph Hellwig
  2025-11-18 10:48 ` Johannes Thumshirn
@ 2025-11-18 15:59 ` Darrick J. Wong
  2025-11-19  5:43   ` Christoph Hellwig
  2025-11-19  0:30 ` Al Viro
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Darrick J. Wong @ 2025-11-18 15:59 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: brauner, viro, jack, linux-fsdevel

On Tue, Nov 18, 2025 at 08:09:41AM +0100, Christoph Hellwig wrote:
> No modular users, nor should there be any for a dispatcher like this.

Does the same logic apply to the EXPORT_SYMBOLs of ioctl_setflags /
ioctl_fs[gs]etxattr?

--D

> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  fs/file_attr.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/file_attr.c b/fs/file_attr.c
> index 1dcec88c0680..63d62742fbb1 100644
> --- a/fs/file_attr.c
> +++ b/fs/file_attr.c
> @@ -316,7 +316,6 @@ int ioctl_getflags(struct file *file, unsigned int __user *argp)
>  		err = put_user(fa.flags, argp);
>  	return err;
>  }
> -EXPORT_SYMBOL(ioctl_getflags);
>  
>  int ioctl_setflags(struct file *file, unsigned int __user *argp)
>  {
> -- 
> 2.47.3
> 
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fs: unexport ioctl_getflags
  2025-11-18  7:09 [PATCH] fs: unexport ioctl_getflags Christoph Hellwig
  2025-11-18 10:48 ` Johannes Thumshirn
  2025-11-18 15:59 ` Darrick J. Wong
@ 2025-11-19  0:30 ` Al Viro
  2025-11-19  5:43   ` Christoph Hellwig
  2025-11-19  8:42 ` Christian Brauner
  2025-11-19  8:45 ` Christian Brauner
  4 siblings, 1 reply; 11+ messages in thread
From: Al Viro @ 2025-11-19  0:30 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: brauner, jack, linux-fsdevel

On Tue, Nov 18, 2025 at 08:09:41AM +0100, Christoph Hellwig wrote:
> No modular users, nor should there be any for a dispatcher like this.

... and AFAICS there never had been any, so it shouldn't have been
exported in the first place.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fs: unexport ioctl_getflags
  2025-11-18 15:59 ` Darrick J. Wong
@ 2025-11-19  5:43   ` Christoph Hellwig
  0 siblings, 0 replies; 11+ messages in thread
From: Christoph Hellwig @ 2025-11-19  5:43 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Christoph Hellwig, brauner, viro, jack, linux-fsdevel

On Tue, Nov 18, 2025 at 07:59:13AM -0800, Darrick J. Wong wrote:
> On Tue, Nov 18, 2025 at 08:09:41AM +0100, Christoph Hellwig wrote:
> > No modular users, nor should there be any for a dispatcher like this.
> 
> Does the same logic apply to the EXPORT_SYMBOLs of ioctl_setflags /
> ioctl_fs[gs]etxattr?

Yes.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fs: unexport ioctl_getflags
  2025-11-19  0:30 ` Al Viro
@ 2025-11-19  5:43   ` Christoph Hellwig
  0 siblings, 0 replies; 11+ messages in thread
From: Christoph Hellwig @ 2025-11-19  5:43 UTC (permalink / raw)
  To: Al Viro; +Cc: Christoph Hellwig, brauner, jack, linux-fsdevel,
	Andrey Albershteyn

On Wed, Nov 19, 2025 at 12:30:04AM +0000, Al Viro wrote:
> On Tue, Nov 18, 2025 at 08:09:41AM +0100, Christoph Hellwig wrote:
> > No modular users, nor should there be any for a dispatcher like this.
> 
> ... and AFAICS there never had been any, so it shouldn't have been
> exported in the first place.

Good question.  It looks like Andrey added them when moving to the
code to a new file despite that commit claiming to be pure refactoring.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fs: unexport ioctl_getflags
  2025-11-18  7:09 [PATCH] fs: unexport ioctl_getflags Christoph Hellwig
                   ` (2 preceding siblings ...)
  2025-11-19  0:30 ` Al Viro
@ 2025-11-19  8:42 ` Christian Brauner
  2025-11-19  9:01   ` Christoph Hellwig
  2025-11-19  8:45 ` Christian Brauner
  4 siblings, 1 reply; 11+ messages in thread
From: Christian Brauner @ 2025-11-19  8:42 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Christian Brauner, jack, linux-fsdevel, viro

On Tue, 18 Nov 2025 08:09:41 +0100, Christoph Hellwig wrote:
> No modular users, nor should there be any for a dispatcher like this.
> 
> 

Applied to the vfs-6.19.misc branch of the vfs/vfs.git tree.
Patches in the vfs-6.19.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-6.19.misc

[1/1] fs: unexport ioctl_getflags
      https://git.kernel.org/vfs/vfs/c/87f58c6cc372

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fs: unexport ioctl_getflags
  2025-11-18  7:09 [PATCH] fs: unexport ioctl_getflags Christoph Hellwig
                   ` (3 preceding siblings ...)
  2025-11-19  8:42 ` Christian Brauner
@ 2025-11-19  8:45 ` Christian Brauner
  2025-11-19  9:03   ` Christoph Hellwig
  4 siblings, 1 reply; 11+ messages in thread
From: Christian Brauner @ 2025-11-19  8:45 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: viro, jack, linux-fsdevel

On Tue, Nov 18, 2025 at 08:09:41AM +0100, Christoph Hellwig wrote:
> No modular users, nor should there be any for a dispatcher like this.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---

Ideally we'd be able to catch unnecessary exports automatically.
Which would also be nice because it would mean that we could enforce
automatic removal of unused exports. I'm pretty sure we have a bunch of
them without realizing it.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fs: unexport ioctl_getflags
  2025-11-19  8:42 ` Christian Brauner
@ 2025-11-19  9:01   ` Christoph Hellwig
  2025-11-19  9:53     ` Christian Brauner
  0 siblings, 1 reply; 11+ messages in thread
From: Christoph Hellwig @ 2025-11-19  9:01 UTC (permalink / raw)
  To: Christian Brauner; +Cc: Christoph Hellwig, jack, linux-fsdevel, viro

On Wed, Nov 19, 2025 at 09:42:53AM +0100, Christian Brauner wrote:
> On Tue, 18 Nov 2025 08:09:41 +0100, Christoph Hellwig wrote:
> > No modular users, nor should there be any for a dispatcher like this.
> > 
> > 

I was going to send a patch doing all the exports in file_attr.c in one
go.  I can do that incrementally, but I think it would be a tad
cleaner.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fs: unexport ioctl_getflags
  2025-11-19  8:45 ` Christian Brauner
@ 2025-11-19  9:03   ` Christoph Hellwig
  0 siblings, 0 replies; 11+ messages in thread
From: Christoph Hellwig @ 2025-11-19  9:03 UTC (permalink / raw)
  To: Christian Brauner
  Cc: viro, jack, linux-fsdevel, Nathan Chancellor, Nicolas Schier,
	linux-kbuild

On Wed, Nov 19, 2025 at 09:45:46AM +0100, Christian Brauner wrote:
> On Tue, Nov 18, 2025 at 08:09:41AM +0100, Christoph Hellwig wrote:
> > No modular users, nor should there be any for a dispatcher like this.
> > 
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > ---
> 
> Ideally we'd be able to catch unnecessary exports automatically.
> Which would also be nice because it would mean that we could enforce
> automatic removal of unused exports. I'm pretty sure we have a bunch of
> them without realizing it.

The problem with that is that it is so configuration dependent.

Also there are occasional cases where we add exports in one merge window
for the users to appear in the next one to reduce cross-subsystem
dependencies, so we'd nee to do this manually.

Maybe just having CONFIG_TRIM_UNUSED_KSYMS outout the unused symbols
in a log file and manually looking over that for various allmodconfigs
might be a good start.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fs: unexport ioctl_getflags
  2025-11-19  9:01   ` Christoph Hellwig
@ 2025-11-19  9:53     ` Christian Brauner
  0 siblings, 0 replies; 11+ messages in thread
From: Christian Brauner @ 2025-11-19  9:53 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: jack, linux-fsdevel, viro

On Wed, Nov 19, 2025 at 10:01:00AM +0100, Christoph Hellwig wrote:
> On Wed, Nov 19, 2025 at 09:42:53AM +0100, Christian Brauner wrote:
> > On Tue, 18 Nov 2025 08:09:41 +0100, Christoph Hellwig wrote:
> > > No modular users, nor should there be any for a dispatcher like this.
> > > 
> > > 
> 
> I was going to send a patch doing all the exports in file_attr.c in one
> go.  I can do that incrementally, but I think it would be a tad
> cleaner.

Sure, send it it one patch. I can update.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-11-19  9:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-18  7:09 [PATCH] fs: unexport ioctl_getflags Christoph Hellwig
2025-11-18 10:48 ` Johannes Thumshirn
2025-11-18 15:59 ` Darrick J. Wong
2025-11-19  5:43   ` Christoph Hellwig
2025-11-19  0:30 ` Al Viro
2025-11-19  5:43   ` Christoph Hellwig
2025-11-19  8:42 ` Christian Brauner
2025-11-19  9:01   ` Christoph Hellwig
2025-11-19  9:53     ` Christian Brauner
2025-11-19  8:45 ` Christian Brauner
2025-11-19  9:03   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).