]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gfs2: Rename GLF_REPLY_PENDING to GLF_HAVE_REPLY
authorAndreas Gruenbacher <agruenba@redhat.com>
Tue, 19 Mar 2024 00:01:28 +0000 (01:01 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 28 May 2024 14:59:53 +0000 (16:59 +0200)
The GLF_REPLY_PENDING flag indicates to glock_work_func() that in
response to a locking request, DLM has sent a reply that needs to be
processed.  A flag with that name could as well indicate that we are
waiting on a reply from DLM, however.  To disambiguate these two cases,
rename the flag to GLF_HAVE_REPLY.

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

index 959668e22c9da10321d7f1f4fd1e6b989a55ae39..34af0e7db98ba46ff73712aaa10fe2dbe6e62b7d 100644 (file)
@@ -1109,8 +1109,8 @@ static void glock_work_func(struct work_struct *work)
        unsigned int drop_refs = 1;
 
        spin_lock(&gl->gl_lockref.lock);
-       if (test_bit(GLF_REPLY_PENDING, &gl->gl_flags)) {
-               clear_bit(GLF_REPLY_PENDING, &gl->gl_flags);
+       if (test_bit(GLF_HAVE_REPLY, &gl->gl_flags)) {
+               clear_bit(GLF_HAVE_REPLY, &gl->gl_flags);
                finish_xmote(gl, gl->gl_reply);
                drop_refs++;
        }
@@ -1642,7 +1642,7 @@ unlock:
        add_to_queue(gh);
        if (unlikely((LM_FLAG_NOEXP & gh->gh_flags) &&
                     test_and_clear_bit(GLF_FROZEN, &gl->gl_flags))) {
-               set_bit(GLF_REPLY_PENDING, &gl->gl_flags);
+               set_bit(GLF_HAVE_REPLY, &gl->gl_flags);
                gl->gl_lockref.count++;
                gfs2_glock_queue_work(gl, 0);
        }
@@ -1930,7 +1930,7 @@ void gfs2_glock_cb(struct gfs2_glock *gl, unsigned int state)
            gl->gl_name.ln_type == LM_TYPE_INODE) {
                if (time_before(now, holdtime))
                        delay = holdtime - now;
-               if (test_bit(GLF_REPLY_PENDING, &gl->gl_flags))
+               if (test_bit(GLF_HAVE_REPLY, &gl->gl_flags))
                        delay = gl->gl_hold_time;
        }
        handle_callback(gl, state, delay, true);
@@ -1993,7 +1993,7 @@ void gfs2_glock_complete(struct gfs2_glock *gl, int ret)
        }
 
        gl->gl_lockref.count++;
-       set_bit(GLF_REPLY_PENDING, &gl->gl_flags);
+       set_bit(GLF_HAVE_REPLY, &gl->gl_flags);
        gfs2_glock_queue_work(gl, 0);
        spin_unlock(&gl->gl_lockref.lock);
 }
@@ -2186,7 +2186,7 @@ static void thaw_glock(struct gfs2_glock *gl)
                return;
 
        spin_lock(&gl->gl_lockref.lock);
-       set_bit(GLF_REPLY_PENDING, &gl->gl_flags);
+       set_bit(GLF_HAVE_REPLY, &gl->gl_flags);
        gfs2_glock_queue_work(gl, 0);
        spin_unlock(&gl->gl_lockref.lock);
 }
@@ -2364,7 +2364,7 @@ static const char *gflags2str(char *buf, const struct gfs2_glock *gl)
                *p++ = 'f';
        if (test_bit(GLF_INVALIDATE_IN_PROGRESS, gflags))
                *p++ = 'i';
-       if (test_bit(GLF_REPLY_PENDING, gflags))
+       if (test_bit(GLF_HAVE_REPLY, gflags))
                *p++ = 'r';
        if (test_bit(GLF_INITIAL, gflags))
                *p++ = 'I';
index aa6dbde9cd19f4af69ebbe1e3fcfb9982d5a9a6b..e4423075433b67f7524532713ae682d35efe54a6 100644 (file)
@@ -322,7 +322,7 @@ enum {
        GLF_DIRTY                       = 6,
        GLF_LFLUSH                      = 7,
        GLF_INVALIDATE_IN_PROGRESS      = 8,
-       GLF_REPLY_PENDING               = 9,
+       GLF_HAVE_REPLY                  = 9,
        GLF_INITIAL                     = 10,
        GLF_FROZEN                      = 11,
        GLF_INSTANTIATE_IN_PROG         = 12, /* instantiate happening now */
index a5deb9f868318f43367e15bf3c1c4f11a224cd05..3721f0333dd724f907c8d9bbaeb69c1ae51bcf8d 100644 (file)
@@ -53,7 +53,7 @@
        {(1UL << GLF_DIRTY),                    "y" },          \
        {(1UL << GLF_LFLUSH),                   "f" },          \
        {(1UL << GLF_INVALIDATE_IN_PROGRESS),   "i" },          \
-       {(1UL << GLF_REPLY_PENDING),            "r" },          \
+       {(1UL << GLF_HAVE_REPLY),               "r" },          \
        {(1UL << GLF_INITIAL),                  "I" },          \
        {(1UL << GLF_FROZEN),                   "F" },          \
        {(1UL << GLF_LRU),                      "L" },          \