diff mbox series

[5/8] e2fsck: Do not trash user limits when processing orphan list

Message ID 20210823154128.16615-6-jack@suse.cz
State Accepted
Headers show
Series Quota fixes for e2fsprogs | expand

Commit Message

Jan Kara Aug. 23, 2021, 3:41 p.m. UTC
When e2fsck was loading quotas to process orphan list, it was loading
only quota usage. However subsequent quota writeout has effectively
overwritten quota limits, loosing them forever. Make sure quota limits
are preserved over orphan replay.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 e2fsck/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/e2fsck/super.c b/e2fsck/super.c
index 75b7b8ffa9b6..4ffafb211e50 100644
--- a/e2fsck/super.c
+++ b/e2fsck/super.c
@@ -282,7 +282,7 @@  static errcode_t e2fsck_read_all_quotas(e2fsck_t ctx)
 			continue;
 
 		retval = quota_read_all_dquots(ctx->qctx, qf_ino, qtype,
-					       QREAD_USAGE);
+					       QREAD_USAGE | QREAD_LIMITS);
 		if (retval)
 			break;
 	}