btrfs: update and correct description of btrfs_get_or_create_delayed_node()
authorCharles Han <hanchunchao@inspur.com>
Thu, 10 Apr 2025 09:07:22 +0000 (17:07 +0800)
committerDavid Sterba <dsterba@suse.com>
Thu, 15 May 2025 12:30:46 +0000 (14:30 +0200)
The comment mistakenly says the function is returning PTR_ERR instead of
ERR_PTR. Fix it and update it so it's more descriptive.

Signed-off-by: Charles Han <hanchunchao@inspur.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ Enhance the function comment. ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/delayed-inode.c

index c49bf8f2889ddad62f83867413caac6ee8ac1325..2d62e9ba65a43c323e6f3ccdf3d53539817868a5 100644 (file)
@@ -119,7 +119,12 @@ static struct btrfs_delayed_node *btrfs_get_delayed_node(
        return NULL;
 }
 
-/* Will return either the node or PTR_ERR(-ENOMEM) */
+/*
+ * Look up an existing delayed node associated with @btrfs_inode or create a new
+ * one and insert it to the delayed nodes of the root.
+ *
+ * Return the delayed node, or error pointer on failure.
+ */
 static struct btrfs_delayed_node *btrfs_get_or_create_delayed_node(
                struct btrfs_inode *btrfs_inode)
 {