[PATCH] block: insert a general SMP memory barrier before wake_up_bit()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



wake_up_bit() uses waitqueue_active() that needs the explicit smp_mb().

Signed-off-by: Jacob Wen <jian.w.wen@xxxxxxxxxx>
---
 fs/block_dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/block_dev.c b/fs/block_dev.c
index 0ae656e022fd..e74980848a2a 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1175,6 +1175,7 @@ static void bd_clear_claiming(struct block_device *whole, void *holder)
 	/* tell others that we're done */
 	BUG_ON(whole->bd_claiming != holder);
 	whole->bd_claiming = NULL;
+	smp_mb();
 	wake_up_bit(&whole->bd_claiming, 0);
 }
 
-- 
2.17.1




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux