Hi,
On 8/24/21 11:12 AM, Andreas Gruenbacher wrote:
On Tue, Aug 24, 2021 at 4:02 PM Bob Peterson <rpete...@redhat.com> wrote:
Before this patch, the go_xmote_bh function was passed gl, the glock
pointer. This patch switches it to gh, the holder, which points to the gl.
This facilitates improvements for the next patch.
Signed-off-by: Bob Peterson <rpete...@redhat.com>
---
fs/gfs2/glock.c | 4 ++--
fs/gfs2/glops.c | 5 +++--
fs/gfs2/incore.h | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index e0eaa9cf9fb6..d43eed1696ab 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -562,9 +562,9 @@ static void finish_xmote(struct gfs2_glock *gl, unsigned
int ret)
if (test_and_clear_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags))
gfs2_demote_wake(gl);
if (state != LM_ST_UNLOCKED) {
- if (glops->go_xmote_bh) {
+ if (gh && glops->go_xmote_bh) {
This changes when the callback is called. Please explain why that's okay.
This is okay because patch 3 eliminates go_xmote_bh() completely anyway.
I just threw the "gh &&" as an abundance of precaution.
Regards,
Bob