diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2022-01-13 13:21:03 -0400 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2022-01-13 13:21:03 -0400 |
commit | c0fe82baaeb2719f910359684c0817057f79a84a (patch) | |
tree | 74d879664c964efbf64ee51b5aa5a582fa868635 /fs/btrfs/extent_io.c | |
parent | c40238e3b8c98993e3c70057f6099e24cc2380f7 (diff) | |
parent | df0cc57e057f18e44dac8e6c18aba47ab53202f9 (diff) | |
download | linux-stable-c0fe82baaeb2719f910359684c0817057f79a84a.tar.gz linux-stable-c0fe82baaeb2719f910359684c0817057f79a84a.tar.bz2 linux-stable-c0fe82baaeb2719f910359684c0817057f79a84a.zip |
Merge tag 'v5.16' into rdma.git for-next
To resolve minor conflict in:
drivers/infiniband/hw/mlx5/mlx5_ib.h
By merging both hunks.
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 3258b6f01e85..9234d96a7fd5 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -6611,6 +6611,14 @@ int read_extent_buffer_pages(struct extent_buffer *eb, int wait, int mirror_num) if (test_bit(EXTENT_BUFFER_UPTODATE, &eb->bflags)) return 0; + /* + * We could have had EXTENT_BUFFER_UPTODATE cleared by the write + * operation, which could potentially still be in flight. In this case + * we simply want to return an error. + */ + if (unlikely(test_bit(EXTENT_BUFFER_WRITE_ERR, &eb->bflags))) + return -EIO; + if (eb->fs_info->sectorsize < PAGE_SIZE) return read_extent_buffer_subpage(eb, wait, mirror_num); |