diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2017-11-06 18:45:30 +0100 |
---|---|---|
committer | Mark Gross <markgross@kernel.org> | 2022-01-11 17:30:32 -0800 |
commit | cfdbb0dfa3f07c12751a7bbbfc47124be53b0024 (patch) | |
tree | dd128de21987bbdb14be8ab1cfec6c44a3f694e7 | |
parent | 1063fcef3e4b2a126c08f9cb5c34eef8ec4c030b (diff) | |
download | linux-rt-cfdbb0dfa3f07c12751a7bbbfc47124be53b0024.tar.gz |
fs: convert two more BH_Uptodate_Lock related bitspinlocks
We convert all BH_Uptodate_Lock based bit-spinlocks to use
bh_uptodate_lock_irqsave() instead. Those two were introduced after the
initial change in -RT and were not noticed before.
Cc: stable-rt@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r-- | fs/ext4/page-io.c | 6 | ||||
-rw-r--r-- | fs/xfs/xfs_aops.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c index 94f60f9d57fd..5c8c64853582 100644 --- a/fs/ext4/page-io.c +++ b/fs/ext4/page-io.c @@ -95,8 +95,7 @@ static void ext4_finish_bio(struct bio *bio) * We check all buffers in the page under BH_Uptodate_Lock * to avoid races with other end io clearing async_write flags */ - local_irq_save(flags); - bit_spin_lock(BH_Uptodate_Lock, &head->b_state); + flags = bh_uptodate_lock_irqsave(head); do { if (bh_offset(bh) < bio_start || bh_offset(bh) + bh->b_size > bio_end) { @@ -108,8 +107,7 @@ static void ext4_finish_bio(struct bio *bio) if (bio->bi_error) buffer_io_error(bh); } while ((bh = bh->b_this_page) != head); - bit_spin_unlock(BH_Uptodate_Lock, &head->b_state); - local_irq_restore(flags); + bh_uptodate_unlock_irqrestore(head, flags); if (!under_io) { #ifdef CONFIG_EXT4_FS_ENCRYPTION if (data_page) diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index f3acecf3869d..c30dbde2a5af 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -112,8 +112,7 @@ xfs_finish_page_writeback( ASSERT(bvec->bv_offset + bvec->bv_len <= PAGE_SIZE); ASSERT((bvec->bv_len & (i_blocksize(inode) - 1)) == 0); - local_irq_save(flags); - bit_spin_lock(BH_Uptodate_Lock, &head->b_state); + flags = bh_uptodate_lock_irqsave(head); do { if (off >= bvec->bv_offset && off < bvec->bv_offset + bvec->bv_len) { @@ -136,8 +135,7 @@ xfs_finish_page_writeback( } off += bh->b_size; } while ((bh = bh->b_this_page) != head); - bit_spin_unlock(BH_Uptodate_Lock, &head->b_state); - local_irq_restore(flags); + bh_uptodate_unlock_irqrestore(head, flags); if (!busy) end_page_writeback(bvec->bv_page); |