mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
gfs2: Fix recovery slot bumping
Get rid of the assumption that the number of slots can at most increase by RECOVER_SIZE_INC (16) in set_recover_size. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
parent
98fb057487
commit
8f0daef5f7
1 changed files with 4 additions and 4 deletions
|
@ -1035,12 +1035,12 @@ static int set_recover_size(struct gfs2_sbd *sdp, struct dlm_slot *slots,
|
|||
}
|
||||
|
||||
old_size = ls->ls_recover_size;
|
||||
|
||||
if (old_size >= max_jid + 1)
|
||||
new_size = old_size;
|
||||
while (new_size < max_jid + 1)
|
||||
new_size += RECOVER_SIZE_INC;
|
||||
if (new_size == old_size)
|
||||
return 0;
|
||||
|
||||
new_size = old_size + RECOVER_SIZE_INC;
|
||||
|
||||
submit = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
|
||||
result = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
|
||||
if (!submit || !result) {
|
||||
|
|
Loading…
Add table
Reference in a new issue