From: Eric Biggers <ebiggers@kernel.org> To: linux-fscrypt@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Linus Torvalds <torvalds@linux-foundation.org> Subject: [PATCH 2/5] ext4: stop calling fscrypt_add_test_dummy_key() Date: Tue, 7 Feb 2023 22:21:04 -0800 [thread overview] Message-ID: <20230208062107.199831-3-ebiggers@kernel.org> (raw) In-Reply-To: <20230208062107.199831-1-ebiggers@kernel.org> From: Eric Biggers <ebiggers@google.com> Now that fs/crypto/ adds the test dummy encryption key on-demand when it's needed, there's no need for individual filesystems to call fscrypt_add_test_dummy_key(). Remove the call to it from ext4. Signed-off-by: Eric Biggers <ebiggers@google.com> --- fs/ext4/super.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 260c1b3e3ef2c..260bbab25db38 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2635,7 +2635,6 @@ static int ext4_check_test_dummy_encryption(const struct fs_context *fc, { const struct ext4_fs_context *ctx = fc->fs_private; const struct ext4_sb_info *sbi = EXT4_SB(sb); - int err; if (!fscrypt_is_dummy_policy_set(&ctx->dummy_enc_policy)) return 0; @@ -2668,17 +2667,7 @@ static int ext4_check_test_dummy_encryption(const struct fs_context *fc, "Conflicting test_dummy_encryption options"); return -EINVAL; } - /* - * fscrypt_add_test_dummy_key() technically changes the super_block, so - * technically it should be delayed until ext4_apply_options() like the - * other changes. But since we never get here for remounts (see above), - * and this is the last chance to report errors, we do it here. - */ - err = fscrypt_add_test_dummy_key(sb, &ctx->dummy_enc_policy); - if (err) - ext4_msg(NULL, KERN_WARNING, - "Error adding test dummy encryption key [%d]", err); - return err; + return 0; } static void ext4_apply_test_dummy_encryption(struct ext4_fs_context *ctx, -- 2.39.1
WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org> To: linux-fscrypt@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Linus Torvalds <torvalds@linux-foundation.org>, linux-f2fs-devel@lists.sourceforge.net Subject: [f2fs-dev] [PATCH 2/5] ext4: stop calling fscrypt_add_test_dummy_key() Date: Tue, 7 Feb 2023 22:21:04 -0800 [thread overview] Message-ID: <20230208062107.199831-3-ebiggers@kernel.org> (raw) In-Reply-To: <20230208062107.199831-1-ebiggers@kernel.org> From: Eric Biggers <ebiggers@google.com> Now that fs/crypto/ adds the test dummy encryption key on-demand when it's needed, there's no need for individual filesystems to call fscrypt_add_test_dummy_key(). Remove the call to it from ext4. Signed-off-by: Eric Biggers <ebiggers@google.com> --- fs/ext4/super.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 260c1b3e3ef2c..260bbab25db38 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2635,7 +2635,6 @@ static int ext4_check_test_dummy_encryption(const struct fs_context *fc, { const struct ext4_fs_context *ctx = fc->fs_private; const struct ext4_sb_info *sbi = EXT4_SB(sb); - int err; if (!fscrypt_is_dummy_policy_set(&ctx->dummy_enc_policy)) return 0; @@ -2668,17 +2667,7 @@ static int ext4_check_test_dummy_encryption(const struct fs_context *fc, "Conflicting test_dummy_encryption options"); return -EINVAL; } - /* - * fscrypt_add_test_dummy_key() technically changes the super_block, so - * technically it should be delayed until ext4_apply_options() like the - * other changes. But since we never get here for remounts (see above), - * and this is the last chance to report errors, we do it here. - */ - err = fscrypt_add_test_dummy_key(sb, &ctx->dummy_enc_policy); - if (err) - ext4_msg(NULL, KERN_WARNING, - "Error adding test dummy encryption key [%d]", err); - return err; + return 0; } static void ext4_apply_test_dummy_encryption(struct ext4_fs_context *ctx, -- 2.39.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2023-02-08 6:22 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-08 6:21 [PATCH 0/5] Add the test_dummy_encryption key on-demand Eric Biggers 2023-02-08 6:21 ` [f2fs-dev] " Eric Biggers 2023-02-08 6:21 ` [PATCH 1/5] fscrypt: add the test dummy encryption " Eric Biggers 2023-02-08 6:21 ` [f2fs-dev] " Eric Biggers 2023-02-08 6:21 ` Eric Biggers [this message] 2023-02-08 6:21 ` [f2fs-dev] [PATCH 2/5] ext4: stop calling fscrypt_add_test_dummy_key() Eric Biggers 2023-02-08 6:21 ` [PATCH 3/5] f2fs: " Eric Biggers 2023-02-08 6:21 ` [f2fs-dev] " Eric Biggers 2023-02-08 6:21 ` [PATCH 4/5] fs/super.c: stop calling fscrypt_destroy_keyring() from __put_super() Eric Biggers 2023-02-08 6:21 ` [f2fs-dev] " Eric Biggers 2023-02-08 6:21 ` [PATCH 5/5] fscrypt: clean up fscrypt_add_test_dummy_key() Eric Biggers 2023-02-08 6:21 ` [f2fs-dev] " Eric Biggers 2023-02-08 15:38 ` [PATCH 0/5] Add the test_dummy_encryption key on-demand Linus Torvalds 2023-02-08 15:38 ` [f2fs-dev] " Linus Torvalds 2023-02-28 1:01 ` patchwork-bot+f2fs 2023-02-28 1:01 ` patchwork-bot+f2fs
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230208062107.199831-3-ebiggers@kernel.org \ --to=ebiggers@kernel.org \ --cc=linux-ext4@vger.kernel.org \ --cc=linux-f2fs-devel@lists.sourceforge.net \ --cc=linux-fscrypt@vger.kernel.org \ --cc=linux-fsdevel@vger.kernel.org \ --cc=torvalds@linux-foundation.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.