diff options
author | Christoph Hellwig <hch@lst.de> | 2021-07-14 16:23:21 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2021-08-23 01:25:40 -0400 |
commit | 6e7c1770a212239e88ec01ddc7a741505bfd10e5 (patch) | |
tree | 528b1ed44d116c0d995f334c8ded5d72e68c7b3b /include/linux/fs.h | |
parent | f9259be6a9e7c22d92e5a5000913147ae17e8321 (diff) | |
download | linux-stable-6e7c1770a212239e88ec01ddc7a741505bfd10e5.tar.gz linux-stable-6e7c1770a212239e88ec01ddc7a741505bfd10e5.tar.bz2 linux-stable-6e7c1770a212239e88ec01ddc7a741505bfd10e5.zip |
fs: simplify get_filesystem_list / get_all_fs_names
Just output the '\0' separate list of supported file systems for block
devices directly rather than going through a pointless round of string
manipulation.
Based on an earlier patch from Al Viro <viro@zeniv.linux.org.uk>.
Vivek:
Modified list_bdev_fs_names() and split_fs_names() to return number of
null terminted strings to caller. Callers now use that information to
loop through all the strings instead of relying on one extra null char
being present at the end.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 640574294216..c76dfc01cf9d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3622,7 +3622,7 @@ int proc_nr_dentry(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); int proc_nr_inodes(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); -int __init get_filesystem_list(char *buf); +int __init list_bdev_fs_names(char *buf, size_t size); #define __FMODE_EXEC ((__force int) FMODE_EXEC) #define __FMODE_NONOTIFY ((__force int) FMODE_NONOTIFY) |