summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-06-29 11:10:56 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-29 11:10:56 -0700
commit6aaf0da8728c55ff627619f933ed161cc89057c6 (patch)
tree68c5aea6374e0bf56bf9235d4684c0f6c7a29f26 /include/linux
parenta9730fca9946f3697410479e0ef1bd759ba00a77 (diff)
parentab16bfc732c436658d13455f28b0b4a2608a7476 (diff)
downloadlinux-6aaf0da8728c55ff627619f933ed161cc89057c6.tar.gz
linux-6aaf0da8728c55ff627619f933ed161cc89057c6.tar.bz2
linux-6aaf0da8728c55ff627619f933ed161cc89057c6.zip
Merge tag 'md/4.2' of git://neil.brown.name/md
Pull md updates from Neil Brown: "A mixed bag - a few bug fixes - some performance improvement that decrease lock contention - some clean-up Nothing major" * tag 'md/4.2' of git://neil.brown.name/md: md: clear Blocked flag on failed devices when array is read-only. md: unlock mddev_lock on an error path. md: clear mddev->private when it has been freed. md: fix a build warning md/raid5: ignore released_stripes check md/raid5: per hash value and exclusive wait_for_stripe md/raid5: split wait_for_stripe and introduce wait_for_quiescent wait: introduce wait_event_exclusive_cmd md: convert to kstrto*() md/raid10: make sync_request_write() call bio_copy_data()
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/wait.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/wait.h b/include/linux/wait.h
index d69ac4ecc88b..1e1bf9f963a9 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -358,6 +358,19 @@ do { \
__ret; \
})
+#define __wait_event_exclusive_cmd(wq, condition, cmd1, cmd2) \
+ (void)___wait_event(wq, condition, TASK_UNINTERRUPTIBLE, 1, 0, \
+ cmd1; schedule(); cmd2)
+/*
+ * Just like wait_event_cmd(), except it sets exclusive flag
+ */
+#define wait_event_exclusive_cmd(wq, condition, cmd1, cmd2) \
+do { \
+ if (condition) \
+ break; \
+ __wait_event_exclusive_cmd(wq, condition, cmd1, cmd2); \
+} while (0)
+
#define __wait_event_cmd(wq, condition, cmd1, cmd2) \
(void)___wait_event(wq, condition, TASK_UNINTERRUPTIBLE, 0, 0, \
cmd1; schedule(); cmd2)