summaryrefslogtreecommitdiff
path: root/libbcachefs/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/io.c')
-rw-r--r--libbcachefs/io.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libbcachefs/io.c b/libbcachefs/io.c
index a59b291a..4585a403 100644
--- a/libbcachefs/io.c
+++ b/libbcachefs/io.c
@@ -2284,6 +2284,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(inode, bvec_iter.bi_sector));