* [PATCH] fs: remove unused vfs_empty_path()
@ 2026-09-18 16:51 Sang-Heon Jeon
2026-09-23 10:40 ` Jan Kara
2026-09-25 15:17 ` Christian Brauner
0 siblings, 2 replies; 3+ messages in thread
From: Sang-Heon Jeon @ 2026-09-18 16:51 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner; +Cc: Jan Kara, linux-fsdevel, linux-kernel
Since commit e896474fe485 ("getname_maybe_null() - the third variant of
pathname copy-in"), vfs_empty_path() has no callers.
So remove it.
No functional change.
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
include/linux/fs.h | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 05d05bb9c951..ef8eb5af06c5 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3653,23 +3653,6 @@ extern int vfs_fadvise(struct file *file, loff_t offset, loff_t len,
extern int generic_fadvise(struct file *file, loff_t offset, loff_t len,
int advice);
-static inline bool vfs_empty_path(int dfd, const char __user *path)
-{
- char c;
-
- if (dfd < 0)
- return false;
-
- /* We now allow NULL to be used for empty path. */
- if (!path)
- return true;
-
- if (unlikely(get_user(c, path)))
- return false;
-
- return !c;
-}
-
int generic_atomic_write_valid(struct kiocb *iocb, struct iov_iter *iter);
static inline bool extensible_ioctl_valid(unsigned int cmd_a,
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fs: remove unused vfs_empty_path()
2026-09-18 16:51 [PATCH] fs: remove unused vfs_empty_path() Sang-Heon Jeon
@ 2026-09-23 10:40 ` Jan Kara
2026-09-25 15:17 ` Christian Brauner
1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2026-09-23 10:40 UTC (permalink / raw)
To: Sang-Heon Jeon
Cc: Alexander Viro, Christian Brauner, Jan Kara, linux-fsdevel, linux-kernel
On Sat 19-09-26 01:51:03, Sang-Heon Jeon wrote:
> Since commit e896474fe485 ("getname_maybe_null() - the third variant of
> pathname copy-in"), vfs_empty_path() has no callers.
>
> So remove it.
>
> No functional change.
>
> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> include/linux/fs.h | 17 -----------------
> 1 file changed, 17 deletions(-)
>
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 05d05bb9c951..ef8eb5af06c5 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -3653,23 +3653,6 @@ extern int vfs_fadvise(struct file *file, loff_t offset, loff_t len,
> extern int generic_fadvise(struct file *file, loff_t offset, loff_t len,
> int advice);
>
> -static inline bool vfs_empty_path(int dfd, const char __user *path)
> -{
> - char c;
> -
> - if (dfd < 0)
> - return false;
> -
> - /* We now allow NULL to be used for empty path. */
> - if (!path)
> - return true;
> -
> - if (unlikely(get_user(c, path)))
> - return false;
> -
> - return !c;
> -}
> -
> int generic_atomic_write_valid(struct kiocb *iocb, struct iov_iter *iter);
>
> static inline bool extensible_ioctl_valid(unsigned int cmd_a,
> --
> 2.43.0
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fs: remove unused vfs_empty_path()
2026-09-18 16:51 [PATCH] fs: remove unused vfs_empty_path() Sang-Heon Jeon
2026-09-23 10:40 ` Jan Kara
@ 2026-09-25 15:17 ` Christian Brauner
1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2026-09-25 15:17 UTC (permalink / raw)
To: Alexander Viro, Sang-Heon Jeon; +Cc: Jan Kara, linux-fsdevel, linux-kernel
On Sat, 19 Sep 2026 01:51:03 +0900, Sang-Heon Jeon wrote:
> fs: remove unused vfs_empty_path()
Applied to the vfs-7.4.misc branch of the vfs/vfs.git tree.
Patches in the vfs-7.4.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-7.4.misc
[1/1] fs: remove unused vfs_empty_path()
https://git.kernel.org/vfs/vfs/c/98abb2b35835
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-25 15:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-18 16:51 [PATCH] fs: remove unused vfs_empty_path() Sang-Heon Jeon
2026-09-23 10:40 ` Jan Kara
2026-09-25 15:17 ` Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®