diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-01-04 19:24:13 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2020-01-04 19:24:13 -0500 |
commit | 304691592738dc272f4150107b54a53ab43fc8be (patch) | |
tree | 2ea58d8794c4b41dc66a0add3690c59c583de207 /libbcachefs/io.c | |
parent | abbe66b6a5051027fd63b2a4cd4cb1d4b09410f6 (diff) |
Update bcachefs sources to c9eb15545d bcachefs: Don't call trans_iter_put() on error pointer
Diffstat (limited to 'libbcachefs/io.c')
-rw-r--r-- | libbcachefs/io.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libbcachefs/io.c b/libbcachefs/io.c index 01f61bc8..4c7dd099 100644 --- a/libbcachefs/io.c +++ b/libbcachefs/io.c @@ -292,13 +292,13 @@ int bch2_extent_update(struct btree_trans *trans, if (delta || new_i_size) { bch2_inode_pack(&inode_p, &inode_u); bch2_trans_update(trans, inode_iter, - &inode_p.inode.k_i); + &inode_p.inode.k_i, 0); } bch2_trans_iter_put(trans, inode_iter); } - bch2_trans_update(trans, iter, k); + bch2_trans_update(trans, iter, k, 0); ret = bch2_trans_commit(trans, disk_res, journal_seq, BTREE_INSERT_NOCHECK_RW| @@ -1738,7 +1738,7 @@ retry: if (!bch2_bkey_narrow_crcs(new.k, new_crc)) goto out; - bch2_trans_update(&trans, iter, new.k); + bch2_trans_update(&trans, iter, new.k, 0); ret = bch2_trans_commit(&trans, NULL, NULL, BTREE_INSERT_NOFAIL| BTREE_INSERT_NOWAIT); @@ -1979,7 +1979,7 @@ int __bch2_read_extent(struct bch_fs *c, struct bch_read_bio *orig, goto hole; iter.bi_size = pick.crc.compressed_size << 9; - goto noclone; + goto get_bio; } if (!(flags & BCH_READ_LAST_FRAGMENT) || @@ -2026,7 +2026,7 @@ int __bch2_read_extent(struct bch_fs *c, struct bch_read_bio *orig, pick.crc.live_size = bvec_iter_sectors(iter); offset_into_extent = 0; } - +get_bio: if (rbio) { /* * promote already allocated bounce rbio: @@ -2064,7 +2064,6 @@ int __bch2_read_extent(struct bch_fs *c, struct bch_read_bio *orig, rbio->bio.bi_iter = iter; rbio->split = true; } else { -noclone: rbio = orig; rbio->bio.bi_iter = iter; EBUG_ON(bio_flagged(&rbio->bio, BIO_CHAIN)); |