aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYangtao Li <[email protected]>2025-04-14 12:52:31 +0000
committerDavid Sterba <[email protected]>2025-05-15 12:30:46 +0000
commitea2a8bacb103f0efcc0693c22fc72f310fe056ef (patch)
tree7da73bbb7aacf09c6350c1c2bad7b5c41853e5c0
parentbtrfs: reuse exit helper for cleanup in btrfs_bioset_init() (diff)
downloadkernel-ea2a8bacb103f0efcc0693c22fc72f310fe056ef.tar.gz
kernel-ea2a8bacb103f0efcc0693c22fc72f310fe056ef.zip
btrfs: simplify return logic from btrfs_delayed_ref_init()
Make this simpler by returning directly when there's no other cleanup needed. Signed-off-by: Yangtao Li <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
-rw-r--r--fs/btrfs/delayed-ref.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
index 343a452a9f9f..739c9e29aaa3 100644
--- a/fs/btrfs/delayed-ref.c
+++ b/fs/btrfs/delayed-ref.c
@@ -1336,7 +1336,7 @@ int __init btrfs_delayed_ref_init(void)
{
btrfs_delayed_ref_head_cachep = KMEM_CACHE(btrfs_delayed_ref_head, 0);
if (!btrfs_delayed_ref_head_cachep)
- goto fail;
+ return -ENOMEM;
btrfs_delayed_ref_node_cachep = KMEM_CACHE(btrfs_delayed_ref_node, 0);
if (!btrfs_delayed_ref_node_cachep)