| .. | .. |
|---|
| 90 | 90 | * We check all buffers in the page under BH_Uptodate_Lock |
|---|
| 91 | 91 | * to avoid races with other end io clearing async_write flags |
|---|
| 92 | 92 | */ |
|---|
| 93 | | - local_irq_save(flags); |
|---|
| 94 | | - bit_spin_lock(BH_Uptodate_Lock, &head->b_state); |
|---|
| 93 | + flags = bh_uptodate_lock_irqsave(head); |
|---|
| 95 | 94 | do { |
|---|
| 96 | 95 | if (bh_offset(bh) < bio_start || |
|---|
| 97 | 96 | bh_offset(bh) + bh->b_size > bio_end) { |
|---|
| .. | .. |
|---|
| 103 | 102 | if (bio->bi_status) |
|---|
| 104 | 103 | buffer_io_error(bh); |
|---|
| 105 | 104 | } while ((bh = bh->b_this_page) != head); |
|---|
| 106 | | - bit_spin_unlock(BH_Uptodate_Lock, &head->b_state); |
|---|
| 107 | | - local_irq_restore(flags); |
|---|
| 105 | + bh_uptodate_unlock_irqrestore(head, flags); |
|---|
| 108 | 106 | if (!under_io) { |
|---|
| 109 | 107 | fscrypt_free_bounce_page(bounce_page); |
|---|
| 110 | 108 | end_page_writeback(page); |
|---|