diff options
author | Eric Biggers <ebiggers@google.com> | 2020-09-17 06:11:36 +0200 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2020-09-22 15:48:52 +0200 |
commit | c8c868abc91ff23f6f5c4444c419de7c277d77e1 (patch) | |
tree | 93dd9591ebdf07595aec0c346ea222e91280d4ba /fs/ext4 | |
parent | fscrypt: handle test_dummy_encryption in more logical way (diff) | |
download | linux-c8c868abc91ff23f6f5c4444c419de7c277d77e1.tar.xz linux-c8c868abc91ff23f6f5c4444c419de7c277d77e1.zip |
fscrypt: make fscrypt_set_test_dummy_encryption() take a 'const char *'
fscrypt_set_test_dummy_encryption() requires that the optional argument
to the test_dummy_encryption mount option be specified as a substring_t.
That doesn't work well with filesystems that use the new mount API,
since the new way of parsing mount options doesn't use substring_t.
Make it take the argument as a 'const char *' instead.
Instead of moving the match_strdup() into the callers in ext4 and f2fs,
make them just use arg->from directly. Since the pattern is
"test_dummy_encryption=%s", the argument will be null-terminated.
Acked-by: Jeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20200917041136.178600-14-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index aa6f64badf58..8b2736283481 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1892,7 +1892,7 @@ static int ext4_set_test_dummy_encryption(struct super_block *sb, "Can't set test_dummy_encryption on remount"); return -1; } - err = fscrypt_set_test_dummy_encryption(sb, arg, + err = fscrypt_set_test_dummy_encryption(sb, arg->from, &sbi->s_dummy_enc_policy); if (err) { if (err == -EEXIST) |