From 86c30a01f5da411d0d090f14f7aeadd8c20b2d05 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Fri, 10 Jun 2022 11:42:33 +0200 Subject: gfs2: Add new go_held glock operation Right now, inode_go_instantiate() contains functionality that relates to how a glock is held rather than the glock itself, like waiting for pending direct I/O to complete and completing interrupted truncates. This code is meant to be run each time a holder is acquired, but go_instantiate is actually only called once, when the glock is instantiated. To fix that, introduce a new go_held glock operation that is called each time a glock holder is acquired. Move the holder specific code in inode_go_instantiate() over to inode_go_held(). Signed-off-by: Andreas Gruenbacher --- fs/gfs2/incore.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/gfs2/incore.h') diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 9e319c8f9efd..15e4258a1dad 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -220,6 +220,7 @@ struct gfs2_glock_operations { void (*go_inval) (struct gfs2_glock *gl, int flags); int (*go_demote_ok) (const struct gfs2_glock *gl); int (*go_instantiate) (struct gfs2_holder *gh); + int (*go_held)(struct gfs2_holder *gh); void (*go_dump)(struct seq_file *seq, struct gfs2_glock *gl, const char *fs_id_buf); void (*go_callback)(struct gfs2_glock *gl, bool remote); -- cgit v1.2.3