Loading fs/fs-writeback.c +3 −2 Original line number Diff line number Diff line Loading @@ -476,10 +476,11 @@ static bool inode_do_switch_wbs(struct inode *inode, switched = true; skip_switch: /* * Paired with load_acquire in unlocked_inode_to_wb_begin() and * Paired with an acquire fence in unlocked_inode_to_wb_begin() and * ensures that the new wb is visible if they see !I_WB_SWITCH. */ smp_store_release(&inode->i_state, inode->i_state & ~I_WB_SWITCH); smp_wmb(); inode->i_state &= ~I_WB_SWITCH; xa_unlock_irq(&mapping->i_pages); spin_unlock(&inode->i_lock); Loading include/linux/backing-dev.h +3 −2 Original line number Diff line number Diff line Loading @@ -277,10 +277,11 @@ unlocked_inode_to_wb_begin(struct inode *inode, struct wb_lock_cookie *cookie) rcu_read_lock(); /* * Paired with store_release in inode_switch_wbs_work_fn() and * Paired with a release fence in inode_do_switch_wbs() and * ensures that we see the new wb if we see cleared I_WB_SWITCH. */ cookie->locked = smp_load_acquire(&inode->i_state) & I_WB_SWITCH; cookie->locked = inode->i_state & I_WB_SWITCH; smp_rmb(); if (unlikely(cookie->locked)) xa_lock_irqsave(&inode->i_mapping->i_pages, cookie->flags); Loading Loading
fs/fs-writeback.c +3 −2 Original line number Diff line number Diff line Loading @@ -476,10 +476,11 @@ static bool inode_do_switch_wbs(struct inode *inode, switched = true; skip_switch: /* * Paired with load_acquire in unlocked_inode_to_wb_begin() and * Paired with an acquire fence in unlocked_inode_to_wb_begin() and * ensures that the new wb is visible if they see !I_WB_SWITCH. */ smp_store_release(&inode->i_state, inode->i_state & ~I_WB_SWITCH); smp_wmb(); inode->i_state &= ~I_WB_SWITCH; xa_unlock_irq(&mapping->i_pages); spin_unlock(&inode->i_lock); Loading
include/linux/backing-dev.h +3 −2 Original line number Diff line number Diff line Loading @@ -277,10 +277,11 @@ unlocked_inode_to_wb_begin(struct inode *inode, struct wb_lock_cookie *cookie) rcu_read_lock(); /* * Paired with store_release in inode_switch_wbs_work_fn() and * Paired with a release fence in inode_do_switch_wbs() and * ensures that we see the new wb if we see cleared I_WB_SWITCH. */ cookie->locked = smp_load_acquire(&inode->i_state) & I_WB_SWITCH; cookie->locked = inode->i_state & I_WB_SWITCH; smp_rmb(); if (unlikely(cookie->locked)) xa_lock_irqsave(&inode->i_mapping->i_pages, cookie->flags); Loading