gfs2: Remove GFS2_MIN_LVB_SIZE define
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 15 Jan 2020 23:25:32 +0000 (00:25 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Mon, 20 Jan 2020 07:46:53 +0000 (08:46 +0100)
The dlm lockspace is set up to have lock value blocks of GDLM_LVB_SIZE bytes,
and dlm is the only lock manager we support, so there is no point in claiming
that the lock value block could have any other size.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glock.c
fs/gfs2/incore.h

index b7123de7c180eb3ebc2affdf66132bdf9a411035..d0eceaff3cea99075b8d57914116d2517ff6b409 100644 (file)
@@ -826,7 +826,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number,
        memset(&gl->gl_lksb, 0, sizeof(struct dlm_lksb));
 
        if (glops->go_flags & GLOF_LVB) {
-               gl->gl_lksb.sb_lvbptr = kzalloc(GFS2_MIN_LVB_SIZE, GFP_NOFS);
+               gl->gl_lksb.sb_lvbptr = kzalloc(GDLM_LVB_SIZE, GFP_NOFS);
                if (!gl->gl_lksb.sb_lvbptr) {
                        kmem_cache_free(cachep, gl);
                        return -ENOMEM;
index e9254e2fbc2049cc9a5714d98562674ba21c7245..68d67d38a09d14e02c3673edf0e276415f9af061 100644 (file)
@@ -387,8 +387,6 @@ struct gfs2_glock {
        struct rhash_head gl_node;
 };
 
-#define GFS2_MIN_LVB_SIZE 32   /* Min size of LVB that gfs2 supports */
-
 enum {
        GIF_INVALID             = 0,
        GIF_QD_LOCKED           = 1,