Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] btrfs: get rid of useless label in btrfs_create_dio_extent()
@ 2026-07-06 11:44 fdmanana
  2026-07-06 15:19 ` Johannes Thumshirn
  2026-07-06 21:36 ` Qu Wenruo
  0 siblings, 2 replies; 3+ messages in thread
From: fdmanana @ 2026-07-06 11:44 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

There's no point in having a label where under it we do nothing but return
a variable. So remove it and directly return where we used to goto.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/direct-io.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/btrfs/direct-io.c b/fs/btrfs/direct-io.c
index 27d227f5bdc0..ed1779ccb4de 100644
--- a/fs/btrfs/direct-io.c
+++ b/fs/btrfs/direct-io.c
@@ -150,7 +150,7 @@ static struct extent_map *btrfs_create_dio_extent(struct btrfs_inode *inode,
 	if (type != BTRFS_ORDERED_NOCOW) {
 		em = btrfs_create_io_em(inode, start, file_extent, type);
 		if (IS_ERR(em))
-			goto out;
+			return em;
 	}
 
 	ordered = btrfs_alloc_ordered_extent(inode, start, file_extent,
@@ -167,7 +167,6 @@ static struct extent_map *btrfs_create_dio_extent(struct btrfs_inode *inode,
 		ASSERT(!dio_data->ordered);
 		dio_data->ordered = ordered;
 	}
- out:
 
 	return em;
 }
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] btrfs: get rid of useless label in btrfs_create_dio_extent()
  2026-07-06 11:44 [PATCH] btrfs: get rid of useless label in btrfs_create_dio_extent() fdmanana
@ 2026-07-06 15:19 ` Johannes Thumshirn
  2026-07-06 21:36 ` Qu Wenruo
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2026-07-06 15:19 UTC (permalink / raw)
  To: fdmanana, linux-btrfs

Looks good,

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] btrfs: get rid of useless label in btrfs_create_dio_extent()
  2026-07-06 11:44 [PATCH] btrfs: get rid of useless label in btrfs_create_dio_extent() fdmanana
  2026-07-06 15:19 ` Johannes Thumshirn
@ 2026-07-06 21:36 ` Qu Wenruo
  1 sibling, 0 replies; 3+ messages in thread
From: Qu Wenruo @ 2026-07-06 21:36 UTC (permalink / raw)
  To: fdmanana, linux-btrfs



在 2026/7/6 21:14, fdmanana@kernel.org 写道:
> From: Filipe Manana <fdmanana@suse.com>
> 
> There's no point in having a label where under it we do nothing but return
> a variable. So remove it and directly return where we used to goto.
> 
> Signed-off-by: Filipe Manana <fdmanana@suse.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu

> ---
>   fs/btrfs/direct-io.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/btrfs/direct-io.c b/fs/btrfs/direct-io.c
> index 27d227f5bdc0..ed1779ccb4de 100644
> --- a/fs/btrfs/direct-io.c
> +++ b/fs/btrfs/direct-io.c
> @@ -150,7 +150,7 @@ static struct extent_map *btrfs_create_dio_extent(struct btrfs_inode *inode,
>   	if (type != BTRFS_ORDERED_NOCOW) {
>   		em = btrfs_create_io_em(inode, start, file_extent, type);
>   		if (IS_ERR(em))
> -			goto out;
> +			return em;
>   	}
>   
>   	ordered = btrfs_alloc_ordered_extent(inode, start, file_extent,
> @@ -167,7 +167,6 @@ static struct extent_map *btrfs_create_dio_extent(struct btrfs_inode *inode,
>   		ASSERT(!dio_data->ordered);
>   		dio_data->ordered = ordered;
>   	}
> - out:
>   
>   	return em;
>   }


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-06 21:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-06 11:44 [PATCH] btrfs: get rid of useless label in btrfs_create_dio_extent() fdmanana
2026-07-06 15:19 ` Johannes Thumshirn
2026-07-06 21:36 ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox