gfs2: Add gfs2_inode_lookup comment
authorAndreas Gruenbacher <agruenba@redhat.com>
Sun, 4 Dec 2022 11:51:55 +0000 (12:51 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 6 Dec 2022 15:06:32 +0000 (16:06 +0100)
Add comment on when and why gfs2_cancel_delete_work() needs to be
skipped in gfs2_inode_lookup().

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

index 9fbbc365a404cf86a24b9a5ac3dd76cd908e88b7..8d4c4b5c4c0dab55263c78529b914a90c493a73a 100644 (file)
@@ -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