hc
2023-11-07 5e8555e3ea324daaf0e38422bcba48c4df33a0d9
kernel/fs/ext4/page-io.c
....@@ -90,8 +90,7 @@
9090 * We check all buffers in the page under BH_Uptodate_Lock
9191 * to avoid races with other end io clearing async_write flags
9292 */
93
- local_irq_save(flags);
94
- bit_spin_lock(BH_Uptodate_Lock, &head->b_state);
93
+ flags = bh_uptodate_lock_irqsave(head);
9594 do {
9695 if (bh_offset(bh) < bio_start ||
9796 bh_offset(bh) + bh->b_size > bio_end) {
....@@ -103,8 +102,7 @@
103102 if (bio->bi_status)
104103 buffer_io_error(bh);
105104 } 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);
108106 if (!under_io) {
109107 fscrypt_free_bounce_page(bounce_page);
110108 end_page_writeback(page);