gfs2: leaf_dealloc needs to allocate one more revoke
authorBob Peterson <rpeterso@redhat.com>
Fri, 3 Jan 2020 14:48:43 +0000 (08:48 -0600)
committerBob Peterson <rpeterso@redhat.com>
Thu, 27 Feb 2020 13:53:18 +0000 (07:53 -0600)
Function leaf_dealloc was not allocating enough journal space for
revokes. Before, it allocated 'l_blocks' revokes, but it needs one
more for the revoke of the dinode that is modified. This patch adds
the needed revoke entry to function leaf_dealloc.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
fs/gfs2/dir.c

index c8b6257..c3f7732 100644 (file)
@@ -2028,7 +2028,8 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len,
 
        error = gfs2_trans_begin(sdp,
                        rg_blocks + (DIV_ROUND_UP(size, sdp->sd_jbsize) + 1) +
-                       RES_DINODE + RES_STATFS + RES_QUOTA, l_blocks);
+                       RES_DINODE + RES_STATFS + RES_QUOTA, RES_DINODE +
+                                l_blocks);
        if (error)
                goto out_rg_gunlock;