]> git.baikalelectronics.ru Git - kernel.git/commit
fs: simplify get_filesystem_list / get_all_fs_names
authorChristoph Hellwig <hch@lst.de>
Wed, 14 Jul 2021 20:23:21 +0000 (16:23 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 23 Aug 2021 05:25:40 +0000 (01:25 -0400)
commit596fd5d5db860acb65b39107b4acfe2f8e80f15b
tree528b1ed44d116c0d995f334c8ded5d72e68c7b3b
parentf40876ac0c3a00a56ebbeffcc30ab7bff6c1f535
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>
fs/filesystems.c
include/linux/fs.h
init/do_mounts.c