aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Han <[email protected]>2025-04-10 09:07:22 +0000
committerDavid Sterba <[email protected]>2025-05-15 12:30:46 +0000
commitecf5b757c74cb8e487a4e7cf2e90b9a3103d764a (patch)
tree61fcf111da4d3de3fe91c25a001f6f78bb4b00a2
parentbtrfs: simplify return logic from btrfs_delayed_ref_init() (diff)
downloadkernel-ecf5b757c74cb8e487a4e7cf2e90b9a3103d764a.tar.gz
kernel-ecf5b757c74cb8e487a4e7cf2e90b9a3103d764a.zip
btrfs: update and correct description of btrfs_get_or_create_delayed_node()
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 <[email protected]> Reviewed-by: David Sterba <[email protected]> [ Enhance the function comment. ] Signed-off-by: David Sterba <[email protected]>
-rw-r--r--fs/btrfs/delayed-inode.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index c49bf8f2889d..2d62e9ba65a4 100644
--- a/fs/btrfs/delayed-inode.c
+++ b/fs/btrfs/delayed-inode.c
@@ -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)
{