]> www.infradead.org Git - users/willy/pagecache.git/commit
mm/shmem: refactor to reuse vfs_parse_monolithic_sep for option parsing
authorGuo Weikang <guoweikang.kernel@gmail.com>
Thu, 5 Dec 2024 09:45:21 +0000 (17:45 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 14 Jan 2025 06:40:49 +0000 (22:40 -0800)
commita474d84359d1a25feae2aafacf35dcaa196fe5f3
treea089520c293ae53333ec39f7b493ad5711e14e53
parent19b65ffae985c16da237edccae324bcbf1a5408e
mm/shmem: refactor to reuse vfs_parse_monolithic_sep for option parsing

shmem_parse_options() is refactored to use vfs_parse_monolithic_sep() with
a custom separator function, shmem_next_opt().  This eliminates redundant
logic for parsing comma-separated options and ensures consistency with
other kernel code that uses the same interface.

The vfs_parse_monolithic_sep() helper was introduced in commit
e001d1447cd4 ("fs: factor out vfs_parse_monolithic_sep() helper").

Link: https://lkml.kernel.org/r/20241205094521.1244678-1-guoweikang.kernel@gmail.com
Signed-off-by: Guo Weikang <guoweikang.kernel@gmail.com>
Cc: Amir Goldstein <amir73il@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/shmem.c