lkml.org 
[lkml]   [2023]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/3] ext4: correct error ctx->mask_s_##name in ctx_set_##name
Date
We should only save the flag to be cleared in ctx->mask_s_##name.

Fixes: 6e47a3cc68fc ("ext4: get rid of super block and sbi from handle_mount_ops()")
Signed-off-by: Baokun Li <libaokun1@huawei.com>
---
fs/ext4/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index f43e526112ae..5b4a323c218b 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2023,7 +2023,7 @@ static int ext4_parse_test_dummy_encryption(const struct fs_parameter *param,
static inline void ctx_set_##name(struct ext4_fs_context *ctx, \
unsigned long flag) \
{ \
- ctx->mask_s_##name |= flag; \
+ ctx->mask_s_##name &= ~flag; \
ctx->vals_s_##name |= flag; \
}

--
2.31.1
\
 
 \ /
  Last update: 2023-03-27 01:03    [W:0.102 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site