]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
gfs2: Remove GIF_ALLOC_FAILED flag
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 23 May 2025 21:23:12 +0000 (23:23 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 9 Jul 2025 17:40:07 +0000 (19:40 +0200)
Get rid of the GIF_ALLOC_FAILED flag; we can now be confident that the
additional consistency check isn't needed.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/incore.h
fs/gfs2/inode.c
fs/gfs2/meta_io.c
fs/gfs2/super.c

index 0a41c4e76b3267ae129d343487a4ca7bfa18dad5..d4ad82f47eeea416f5fc4fb3f3a748c4961f261e 100644 (file)
@@ -375,7 +375,6 @@ struct gfs2_glock {
 
 enum {
        GIF_QD_LOCKED           = 1,
-       GIF_ALLOC_FAILED        = 2,
        GIF_SW_PAGED            = 3,
        GIF_FREE_VFS_INODE      = 5,
        GIF_GLOP_PENDING        = 6,
index 187d789a8f1e3a270c8f4b7526f18f6061769315..8760e7e20c9d842bf6f5ddca48386a162faaf47c 100644 (file)
@@ -444,11 +444,9 @@ static void gfs2_final_release_pages(struct gfs2_inode *ip)
        struct inode *inode = &ip->i_inode;
        struct gfs2_glock *gl = ip->i_gl;
 
-       if (unlikely(!gl)) {
-               /* This can only happen during incomplete inode creation. */
-               BUG_ON(!test_bit(GIF_ALLOC_FAILED, &ip->i_flags));
+       /* This can only happen during incomplete inode creation. */
+       if (unlikely(!gl))
                return;
-       }
 
        truncate_inode_pages(gfs2_glock2aspace(gl), 0);
        truncate_inode_pages(&inode->i_data, 0);
@@ -902,7 +900,6 @@ fail_gunlock3:
 fail_gunlock2:
        gfs2_glock_put(io_gl);
 fail_dealloc_inode:
-       set_bit(GIF_ALLOC_FAILED, &ip->i_flags);
        dealloc_error = 0;
        if (ip->i_eattr)
                dealloc_error = gfs2_ea_dealloc(ip, xattr_initialized);
index 72c730582451ac55e9dd03f3b88a0340e1790cdb..a2e9fdd8cbb35fde9a79344a76a3bd7525622da5 100644 (file)
@@ -443,11 +443,9 @@ void gfs2_journal_wipe(struct gfs2_inode *ip, u64 bstart, u32 blen)
        struct buffer_head *bh;
        int ty;
 
-       if (!ip->i_gl) {
-               /* This can only happen during incomplete inode creation. */
-               BUG_ON(!test_bit(GIF_ALLOC_FAILED, &ip->i_flags));
+       /* This can only happen during incomplete inode creation. */
+       if (!ip->i_gl)
                return;
-       }
 
        gfs2_ail1_wipe(sdp, bstart, blen);
        while (blen) {
index 7c518c4ff63805af21f2a268385a152cdb7e29b8..b42e2110084b6cf87da3c0fcf92bc329ffcb3621 100644 (file)
@@ -487,11 +487,9 @@ static void gfs2_dirty_inode(struct inode *inode, int flags)
        int need_endtrans = 0;
        int ret;
 
-       if (unlikely(!ip->i_gl)) {
-               /* This can only happen during incomplete inode creation. */
-               BUG_ON(!test_bit(GIF_ALLOC_FAILED, &ip->i_flags));
+       /* This can only happen during incomplete inode creation. */
+       if (unlikely(!ip->i_gl))
                return;
-       }
 
        if (gfs2_withdrawing_or_withdrawn(sdp))
                return;