diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-10-12 10:43:02 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-11-24 21:59:08 +0100 |
| commit | 28fe58ce6a20aa674076645bcfc1be126a12ed4b (patch) | |
| tree | 1418682280c5b2d877c94718ad191fee968d2a41 /fs/btrfs/extent_io.c | |
| parent | 74ca34f79e53657760c3b09abe1bd593b849ca8c (diff) | |
btrfs: add unlikely to unexpected error case in extent_writepages()
We don't expect to hit errors and log the error message, so add the
unlikely annotation to make it clear and to hint the compiler that it may
reorganize code to be more efficient.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Anand Jain <asj@kernel.org>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
| -rw-r--r-- | fs/btrfs/extent_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index c741de164535..cb680cdeb77d 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -1874,7 +1874,7 @@ static int extent_writepage(struct folio *folio, struct btrfs_bio_ctrl *bio_ctrl folio_size(folio), bio_ctrl, i_size); if (ret == 1) return 0; - if (ret < 0) + if (unlikely(ret < 0)) btrfs_err_rl(fs_info, "failed to submit blocks, root=%lld inode=%llu folio=%llu submit_bitmap=%*pbl: %d", btrfs_root_id(inode->root), btrfs_ino(inode), |
