linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs: remove vfs_ioctl export
@ 2025-08-30 10:55 Greg Kroah-Hartman
  2025-09-01  9:50 ` Jan Kara
  2025-09-01 11:08 ` Christian Brauner
  0 siblings, 2 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2025-08-30 10:55 UTC (permalink / raw)
  To: linux-fsdevel
  Cc: linux-kernel, Greg Kroah-Hartman, Alexander Viro,
	Christian Brauner, Jan Kara

vfs_ioctl() is no longer called by anything outside of fs/ioctl.c, so
remove the global symbol and export as it is not needed.

Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/ioctl.c         | 3 +--
 include/linux/fs.h | 2 --
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/ioctl.c b/fs/ioctl.c
index 0248cb8db2d3..3ee1aaa46947 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -41,7 +41,7 @@
  *
  * Returns 0 on success, -errno on error.
  */
-int vfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
+static int vfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 {
 	int error = -ENOTTY;
 
@@ -54,7 +54,6 @@ int vfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
  out:
 	return error;
 }
-EXPORT_SYMBOL(vfs_ioctl);
 
 static int ioctl_fibmap(struct file *filp, int __user *p)
 {
diff --git a/include/linux/fs.h b/include/linux/fs.h
index d7ab4f96d705..ccf482803525 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2052,8 +2052,6 @@ int vfs_fchown(struct file *file, uid_t user, gid_t group);
 int vfs_fchmod(struct file *file, umode_t mode);
 int vfs_utimes(const struct path *path, struct timespec64 *times);
 
-int vfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
-
 #ifdef CONFIG_COMPAT
 extern long compat_ptr_ioctl(struct file *file, unsigned int cmd,
 					unsigned long arg);
-- 
2.51.0


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

* Re: [PATCH] fs: remove vfs_ioctl export
  2025-08-30 10:55 [PATCH] fs: remove vfs_ioctl export Greg Kroah-Hartman
@ 2025-09-01  9:50 ` Jan Kara
  2025-09-01 11:08 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2025-09-01  9:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-fsdevel, linux-kernel, Alexander Viro, Christian Brauner,
	Jan Kara

On Sat 30-08-25 12:55:39, Greg Kroah-Hartman wrote:
> vfs_ioctl() is no longer called by anything outside of fs/ioctl.c, so
> remove the global symbol and export as it is not needed.
> 
> Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> Cc: Christian Brauner <brauner@kernel.org>
> Cc: Jan Kara <jack@suse.cz>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Indeed. Thanks for the cleanup. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

									Honza

> ---
>  fs/ioctl.c         | 3 +--
>  include/linux/fs.h | 2 --
>  2 files changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/fs/ioctl.c b/fs/ioctl.c
> index 0248cb8db2d3..3ee1aaa46947 100644
> --- a/fs/ioctl.c
> +++ b/fs/ioctl.c
> @@ -41,7 +41,7 @@
>   *
>   * Returns 0 on success, -errno on error.
>   */
> -int vfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
> +static int vfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
>  {
>  	int error = -ENOTTY;
>  
> @@ -54,7 +54,6 @@ int vfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
>   out:
>  	return error;
>  }
> -EXPORT_SYMBOL(vfs_ioctl);
>  
>  static int ioctl_fibmap(struct file *filp, int __user *p)
>  {
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index d7ab4f96d705..ccf482803525 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -2052,8 +2052,6 @@ int vfs_fchown(struct file *file, uid_t user, gid_t group);
>  int vfs_fchmod(struct file *file, umode_t mode);
>  int vfs_utimes(const struct path *path, struct timespec64 *times);
>  
> -int vfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
> -
>  #ifdef CONFIG_COMPAT
>  extern long compat_ptr_ioctl(struct file *file, unsigned int cmd,
>  					unsigned long arg);
> -- 
> 2.51.0
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

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

* Re: [PATCH] fs: remove vfs_ioctl export
  2025-08-30 10:55 [PATCH] fs: remove vfs_ioctl export Greg Kroah-Hartman
  2025-09-01  9:50 ` Jan Kara
@ 2025-09-01 11:08 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2025-09-01 11:08 UTC (permalink / raw)
  To: linux-fsdevel, Greg Kroah-Hartman
  Cc: Christian Brauner, linux-kernel, Alexander Viro, Jan Kara

On Sat, 30 Aug 2025 12:55:39 +0200, Greg Kroah-Hartman wrote:
> vfs_ioctl() is no longer called by anything outside of fs/ioctl.c, so
> remove the global symbol and export as it is not needed.
> 
> 

Applied to the vfs-6.18.misc branch of the vfs/vfs.git tree.
Patches in the vfs-6.18.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.18.misc

[1/1] fs: remove vfs_ioctl export
      https://git.kernel.org/vfs/vfs/c/e5bca063c150

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

end of thread, other threads:[~2025-09-01 11:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-30 10:55 [PATCH] fs: remove vfs_ioctl export Greg Kroah-Hartman
2025-09-01  9:50 ` Jan Kara
2025-09-01 11:08 ` Christian Brauner

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).