summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/closure.h
diff options
context:
space:
mode:
authorColy Li <colyli@suse.de>2018-08-11 07:20:00 +0200
committerJens Axboe <axboe@kernel.dk>2018-08-11 23:46:42 +0200
commiteb2b3d034511f7f5f5fa781b9354ea4d5dbd4fc5 (patch)
treead0d16a069090d085913618d74c928ef828417bc /drivers/md/bcache/closure.h
parentbcache: remove unnecessary space before ioctl function pointer arguments (diff)
downloadlinux-eb2b3d034511f7f5f5fa781b9354ea4d5dbd4fc5.tar.xz
linux-eb2b3d034511f7f5f5fa781b9354ea4d5dbd4fc5.zip
bcache: add the missing comments for smp_mb()/smp_wmb()
Checkpatch.pl warns there are 2 locations of smp_mb() and smp_wmb() without code comment. This patch adds the missing code comments for these memory barrier calls. Signed-off-by: Coly Li <colyli@suse.de> Reviewed-by: Shenghui Wang <shhuiw@foxmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache/closure.h')
-rw-r--r--drivers/md/bcache/closure.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/bcache/closure.h b/drivers/md/bcache/closure.h
index 7f3594c0be14..eca0d496b686 100644
--- a/drivers/md/bcache/closure.h
+++ b/drivers/md/bcache/closure.h
@@ -289,10 +289,12 @@ static inline void closure_init_stack(struct closure *cl)
}
/**
- * closure_wake_up - wake up all closures on a wait list.
+ * closure_wake_up - wake up all closures on a wait list,
+ * with memory barrier
*/
static inline void closure_wake_up(struct closure_waitlist *list)
{
+ /* Memory barrier for the wait list */
smp_mb();
__closure_wake_up(list);
}