aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glops.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2022-06-11 05:04:11 +0200
committerAndreas Gruenbacher <agruenba@redhat.com>2022-06-29 16:53:22 +0200
commit53d69132958f7e144973d02ad0f0798386219efd (patch)
tree56f2531bbc4fdbfb3e7fe72c6b511dfe816083b5 /fs/gfs2/glops.c
parentbdff777cbb582da52cf4b536adc0815a41b407ed (diff)
downloadlinux-53d69132958f7e144973d02ad0f0798386219efd.tar.gz
gfs2: Instantiate glocks ouside of glock state engine
Instantiate glocks outside of the glock state engine: there is no real reason for instantiating them inside the glock state engine; it only complicates the code. Instead, instantiate them in gfs2_glock_wait() and gfs2_glock_async_wait() using the new gfs2_glock_holder_ready() helper. On top of that, the only other place that acquires a glock without using gfs2_glock_wait() or gfs2_glock_async_wait() is gfs2_upgrade_iopen_glock(), so call gfs2_glock_holder_ready() there as well. If a dinode has a pending truncate, the glock-specific instantiate function for inodes wakes up the truncate function in the quota daemon. Waiting for the completion of the truncate was previously done by the glock state engine, but we now need to wait in inode_go_instantiate(). This also means that gfs2_instantiate() will now no longer return any "special" error codes. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r--fs/gfs2/glops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index 392800f082a6b..6bc0966106541 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -510,7 +510,7 @@ static int inode_go_instantiate(struct gfs2_holder *gh)
list_add(&ip->i_trunc_list, &sdp->sd_trunc_list);
spin_unlock(&sdp->sd_trunc_lock);
wake_up(&sdp->sd_quota_wait);
- error = 1;
+ gfs2_wait_truncate(ip);
}
out: