Skip to content

Commit 938d9f3

Browse files
committed
gfs2: skip if we cannot defer delete
jira NONE_AUTOMATION Rebuild_History Non-Buildable kernel-5.14.0-570.12.1.el9_6 commit-author Andreas Gruenbacher <[email protected]> commit 41a8e04 In gfs2_evict_inode(), in the unlikely case that we cannot defer deleting the inode, it is not safe to fall back to deleting the inode; the only valid choice we have is to skip the delete. In addition, in evict_should_delete(), if we cannot lock the inode glock exclusively, we are in a bad enough state that skipping the delete is likely a better choice than trying to recover from the failure later. Fixes: c5b7a24 ("gfs2: Only defer deletes when we have an iopen glock") Signed-off-by: Andreas Gruenbacher <[email protected]> (cherry picked from commit 41a8e04) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 8e5107c commit 938d9f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/gfs2/super.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ static enum evict_behavior evict_should_delete(struct inode *inode,
13541354
/* Must not read inode block until block type has been verified */
13551355
ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_SKIP, gh);
13561356
if (unlikely(ret))
1357-
return EVICT_SHOULD_DEFER_DELETE;
1357+
return EVICT_SHOULD_SKIP_DELETE;
13581358

13591359
if (gfs2_inode_already_deleted(ip->i_gl, ip->i_no_formal_ino))
13601360
return EVICT_SHOULD_SKIP_DELETE;
@@ -1515,7 +1515,7 @@ static void gfs2_evict_inode(struct inode *inode)
15151515
gfs2_glock_put(io_gl);
15161516
goto out;
15171517
}
1518-
behavior = EVICT_SHOULD_DELETE;
1518+
behavior = EVICT_SHOULD_SKIP_DELETE;
15191519
}
15201520
if (behavior == EVICT_SHOULD_DELETE)
15211521
ret = evict_unlinked_inode(inode);

0 commit comments

Comments
 (0)