Re: [PATCH] btrfs: get rid of useless label in btrfs_create_dio_extent()
Qu Wenruo <[email protected]>
| Newsgroups | org.kernel.vger.linux-btrfs |
|---|---|
| Message-ID | <[email protected]> |
在 2026/7/6 21:14, [email protected] 写道: > From: Filipe Manana <[email protected]> > > 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 <[email protected]> Reviewed-by: Qu Wenruo <[email protected]> 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; > }