diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2022-12-04 03:48:52 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2022-12-06 16:06:31 +0100 |
commit | 764665c6775251d4569ba9f09981459bbb166359 (patch) | |
tree | ccb4f9c1205c20dfb6d37463c2b97a7e58433ae0 /fs/gfs2/glock.h | |
parent | gfs2: Avoid dequeuing GL_ASYNC glock holders twice (diff) | |
download | linux-764665c6775251d4569ba9f09981459bbb166359.tar.xz linux-764665c6775251d4569ba9f09981459bbb166359.zip |
gfs2: Clean up after gfs2_create_inode rework
Since commit 3d36e57ff768 ("gfs2: gfs2_create_inode rework"),
gfs2_evict_inode() and gfs2_create_inode() / gfs2_inode_lookup() will
synchronize via the inode hash table and we can be certain that once a
new inode is inserted into the inode hash table(), gfs2_evict_inode()
has completely destroyed any previous versions. We no longer need to
worry about overlapping inode object lifespans. Update the code and
comments accordingly.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/glock.h')
-rw-r--r-- | fs/gfs2/glock.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h index 76cd2fabc668..d561126cfb47 100644 --- a/fs/gfs2/glock.h +++ b/fs/gfs2/glock.h @@ -322,20 +322,6 @@ static inline void glock_set_object(struct gfs2_glock *gl, void *object) /** * glock_clear_object - clear the gl_object field of a glock * @gl: the glock - * @object: the object - * - * I'd love to similarly add this: - * else if (gfs2_assert_warn(gl->gl_sbd, gl->gl_object == object)) - * gfs2_dump_glock(NULL, gl, true); - * Unfortunately, that's not possible because as soon as gfs2_delete_inode - * frees the block in the rgrp, another process can reassign it for an I_NEW - * inode in gfs2_create_inode because that calls new_inode, not gfs2_iget. - * That means gfs2_delete_inode may subsequently try to call this function - * for a glock that's already pointing to a brand new inode. If we clear the - * new inode's gl_object, we'll introduce metadata corruption. Function - * gfs2_delete_inode calls clear_inode which calls gfs2_clear_inode which also - * tries to clear gl_object, so it's more than just gfs2_delete_inode. - * */ static inline void glock_clear_object(struct gfs2_glock *gl, void *object) { |