lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 4 Aug 2020 15:49:21 +0800
From:   brookxu <brookxu.cn@...il.com>
To:     tytso@....edu, adilger.kernel@...ger.ca
Cc:     linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ext4: delete invalid ac_b_extent backup inside
 ext4_mb_use_best_found()

Delete invalid ac_b_extent backup inside ext4_mb_use_best_found(),
we have done this operation in ext4_mb_new_group_pa() and
ext4_mb_new_inode_pa().

Signed-off-by: Chunguang Xu <brookxu@...cent.com>
---
 fs/ext4/mballoc.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 9b1c3ad..fb63e9f 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -1704,10 +1704,6 @@ static void ext4_mb_use_best_found(struct ext4_allocation_context *ac,
     ac->ac_b_ex.fe_logical = ac->ac_g_ex.fe_logical;
     ret = mb_mark_used(e4b, &ac->ac_b_ex);
 
-    /* preallocation can change ac_b_ex, thus we store actually
-     * allocated blocks for history */
-    ac->ac_f_ex = ac->ac_b_ex;
-
     ac->ac_status = AC_STATUS_FOUND;
     ac->ac_tail = ret & 0xffff;
     ac->ac_buddy = ret >> 16;
@@ -1726,8 +1722,8 @@ static void ext4_mb_use_best_found(struct ext4_allocation_context *ac,
     /* store last allocated for subsequent stream allocation */
     if (ac->ac_flags & EXT4_MB_STREAM_ALLOC) {
         spin_lock(&sbi->s_md_lock);
-        sbi->s_mb_last_group = ac->ac_f_ex.fe_group;
-        sbi->s_mb_last_start = ac->ac_f_ex.fe_start;
+        sbi->s_mb_last_group = ac->ac_b_ex.fe_group;
+        sbi->s_mb_last_start = ac->ac_b_ex.fe_start;
         spin_unlock(&sbi->s_md_lock);
     }
     /*
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ