diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2022-06-11 06:04:11 +0300 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2022-06-29 17:53:22 +0300 |
commit | 53d69132958f7e144973d02ad0f0798386219efd (patch) | |
tree | 56f2531bbc4fdbfb3e7fe72c6b511dfe816083b5 /fs/gfs2/glops.c | |
parent | bdff777cbb582da52cf4b536adc0815a41b407ed (diff) | |
download | linux-53d69132958f7e144973d02ad0f0798386219efd.tar.xz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 392800f082a6..6bc096610654 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: |