gfs2: Add new go_held glock operation
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 10 Jun 2022 09:42:33 +0000 (11:42 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 29 Jun 2022 14:56:41 +0000 (16:56 +0200)
commit86c30a01f5da411d0d090f14f7aeadd8c20b2d05
treeee9f254abe2fe9f60da91ecd4607b6550e430100
parentde3f906f0af0c3f5d862b07df4d020c9322cd9c3
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 <agruenba@redhat.com>
fs/gfs2/glock.c
fs/gfs2/glops.c
fs/gfs2/incore.h