diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-05-17 01:38:57 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-05-17 02:36:19 -0400 |
commit | ff86d4722124c300c40b85b6eb8ef2d410ab303c (patch) | |
tree | 05e54b0bf6397ecbb5e7717a7925ac6ed2645a68 /libbcachefs/move.c | |
parent | 800408be11898f6d53ceecfd894cce8860fda26a (diff) |
Update bcachefs sources to 0906b1fb49 bcachefs: fixes for 32 bit/big endian machines
Diffstat (limited to 'libbcachefs/move.c')
-rw-r--r-- | libbcachefs/move.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libbcachefs/move.c b/libbcachefs/move.c index 0431fb81..3e52b7a2 100644 --- a/libbcachefs/move.c +++ b/libbcachefs/move.c @@ -306,16 +306,16 @@ static void move_write(struct closure *cl) { struct moving_io *io = container_of(cl, struct moving_io, cl); - if (likely(!io->rbio.bio.bi_status && - !io->rbio.hole)) { - bch2_migrate_read_done(&io->write, &io->rbio); - - atomic_add(io->write_sectors, &io->write.ctxt->write_sectors); - closure_call(&io->write.op.cl, bch2_write, NULL, cl); - continue_at(cl, move_write_done, NULL); + if (unlikely(io->rbio.bio.bi_status || io->rbio.hole)) { + closure_return_with_destructor(cl, move_free); + return; } - closure_return_with_destructor(cl, move_free); + bch2_migrate_read_done(&io->write, &io->rbio); + + atomic_add(io->write_sectors, &io->write.ctxt->write_sectors); + closure_call(&io->write.op.cl, bch2_write, NULL, cl); + continue_at(cl, move_write_done, NULL); } static inline struct moving_io *next_pending_write(struct moving_context *ctxt) @@ -411,7 +411,7 @@ static int bch2_move_extent(struct bch_fs *c, io->write.op.wbio.bio.bi_iter.bi_size = sectors << 9; bch2_bio_map(&io->write.op.wbio.bio, NULL); - if (bio_alloc_pages(&io->write.op.wbio.bio, GFP_KERNEL)) + if (bch2_bio_alloc_pages(&io->write.op.wbio.bio, GFP_KERNEL)) goto err_free; io->rbio.opts = io_opts; |