summaryrefslogtreecommitdiff
path: root/libbcachefs/fs-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/fs-io.c')
-rw-r--r--libbcachefs/fs-io.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libbcachefs/fs-io.c b/libbcachefs/fs-io.c
index 1ac99f37..3333f616 100644
--- a/libbcachefs/fs-io.c
+++ b/libbcachefs/fs-io.c
@@ -808,6 +808,15 @@ retry:
unsigned bytes, sectors, offset_into_extent;
enum btree_id data_btree = BTREE_ID_extents;
+ /*
+ * read_extent -> io_time_reset may cause a transaction restart
+ * without returning an error, we need to check for that here:
+ */
+ if (!bch2_trans_relock(trans)) {
+ ret = -EINTR;
+ break;
+ }
+
bch2_btree_iter_set_pos(iter,
POS(inum, rbio->bio.bi_iter.bi_sector));