gfs2: Use [NO_]CREATE consistently for gfs2_glock_get
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 15 Jan 2024 21:01:12 +0000 (22:01 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 9 Apr 2024 16:35:57 +0000 (18:35 +0200)
When calling gfs2_glock_get(), consistently pass the CREATE or NO_CREATE
flag for the create argument.  This is the only place that passes 0
instead.

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

index 32d3484270f39c177e09173b224482b8ed1bd736..ecc699f8d9fcaa01f7514a465d7d9f42ac8d659c 100644 (file)
@@ -336,7 +336,7 @@ static ssize_t demote_rq_store(struct gfs2_sbd *sdp, const char *buf, size_t len
                return -EINVAL;
        if (!test_and_set_bit(SDF_DEMOTE, &sdp->sd_flags))
                fs_info(sdp, "demote interface used\n");
-       rv = gfs2_glock_get(sdp, glnum, glops, 0, &gl);
+       rv = gfs2_glock_get(sdp, glnum, glops, NO_CREATE, &gl);
        if (rv)
                return rv;
        gfs2_glock_cb(gl, glmode);