From: Andreas Gruenbacher Date: Sun, 4 Dec 2022 11:51:55 +0000 (+0100) Subject: gfs2: Add gfs2_inode_lookup comment X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2ec750a01d189cf1872cd79490d0911a7bd519f8;p=users%2Fjedix%2Flinux-maple.git gfs2: Add gfs2_inode_lookup comment Add comment on when and why gfs2_cancel_delete_work() needs to be skipped in gfs2_inode_lookup(). Signed-off-by: Andreas Gruenbacher --- diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 9fbbc365a404..8d4c4b5c4c0d 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -142,6 +142,11 @@ struct inode *gfs2_inode_lookup(struct super_block *sb, unsigned int type, if (unlikely(error)) goto fail; + /* + * The only caller that sets @blktype to GFS2_BLKST_UNLINKED is + * delete_work_func(). Make sure not to cancel the delete work + * from within itself here. + */ if (blktype == GFS2_BLKST_UNLINKED) extra_flags |= LM_FLAG_TRY; else