diff options
author | Lukas Czerner <lczerner@redhat.com> | 2022-10-04 15:58:03 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-07 11:11:59 +0100 |
commit | 15adfbb2d161086b508b9ce1f91ce81403f265b1 (patch) | |
tree | 0cae751d987c56bfd9ffdc0b44932efb569031d8 /fs | |
parent | 5e1d519af52fca8d6073b1f2430d2de95969e8cf (diff) | |
download | linux-stable-15adfbb2d161086b508b9ce1f91ce81403f265b1.tar.gz linux-stable-15adfbb2d161086b508b9ce1f91ce81403f265b1.tar.bz2 linux-stable-15adfbb2d161086b508b9ce1f91ce81403f265b1.zip |
ext4: journal_path mount options should follow links
commit e3ea75ee651daf5e434afbfdb7dbf75e200ea1f6 upstream.
Before the commit 461c3af045d3 ("ext4: Change handle_mount_opt() to use
fs_parameter") ext4 mount option journal_path did follow links in the
provided path.
Bring this behavior back by allowing to pass pathwalk flags to
fs_lookup_param().
Fixes: 461c3af045d3 ("ext4: Change handle_mount_opt() to use fs_parameter")
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/20221004135803.32283-1-lczerner@redhat.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/super.c | 2 | ||||
-rw-r--r-- | fs/fs_parser.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index a83810cd9041..9c70da093146 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2247,7 +2247,7 @@ static int ext4_parse_param(struct fs_context *fc, struct fs_parameter *param) return -EINVAL; } - error = fs_lookup_param(fc, param, 1, &path); + error = fs_lookup_param(fc, param, 1, LOOKUP_FOLLOW, &path); if (error) { ext4_msg(NULL, KERN_ERR, "error: could not find " "journal device path"); diff --git a/fs/fs_parser.c b/fs/fs_parser.c index ed40ce5742fd..edb3712dcfa5 100644 --- a/fs/fs_parser.c +++ b/fs/fs_parser.c @@ -138,15 +138,16 @@ EXPORT_SYMBOL(__fs_parse); * @fc: The filesystem context to log errors through. * @param: The parameter. * @want_bdev: T if want a blockdev + * @flags: Pathwalk flags passed to filename_lookup() * @_path: The result of the lookup */ int fs_lookup_param(struct fs_context *fc, struct fs_parameter *param, bool want_bdev, + unsigned int flags, struct path *_path) { struct filename *f; - unsigned int flags = 0; bool put_f; int ret; |