]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/gfs2/lock_dlm.c
Merge tag 'acpi-5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
[linux.git] / fs / gfs2 / lock_dlm.c
index 4361804646d87862b47acc0249bc463f15569ceb..7c7197343ee2b8b0c1a53380b32c90648064b707 100644 (file)
@@ -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) {