Skip to content

Commit f9da18c

Browse files
AstralBobAndreas Gruenbacher
authored andcommitted
gfs2: Don't remember delete unless it's successful
This patch changes function evict_unlinked_inode so it does not call gfs2_inode_remember_delete until it gets a good return code from gfs2_dinode_dealloc. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent 17a5934 commit f9da18c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

fs/gfs2/super.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,9 +1332,6 @@ static int evict_unlinked_inode(struct inode *inode)
13321332
goto out;
13331333
}
13341334

1335-
if (ip->i_gl)
1336-
gfs2_inode_remember_delete(ip->i_gl, ip->i_no_formal_ino);
1337-
13381335
/*
13391336
* As soon as we clear the bitmap for the dinode, gfs2_create_inode()
13401337
* can get called to recreate it, or even gfs2_inode_lookup() if the
@@ -1348,6 +1345,9 @@ static int evict_unlinked_inode(struct inode *inode)
13481345
*/
13491346

13501347
ret = gfs2_dinode_dealloc(ip);
1348+
if (!ret && ip->i_gl)
1349+
gfs2_inode_remember_delete(ip->i_gl, ip->i_no_formal_ino);
1350+
13511351
out:
13521352
return ret;
13531353
}

0 commit comments

Comments
 (0)