Merge branch 'for-3.20/bdi' of git://git.kernel.dk/linux-block
[linux-drm-fsl-dcu.git] / fs / aio.c
index 3bf8b1d250c3483ad418a00b9bea052cdc810366..118a2e0088d8fdd8391654a44edb06157dad5629 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1127,6 +1127,13 @@ static long aio_read_events_ring(struct kioctx *ctx,
        long ret = 0;
        int copy_ret;
 
+       /*
+        * The mutex can block and wake us up and that will cause
+        * wait_event_interruptible_hrtimeout() to schedule without sleeping
+        * and repeat. This should be rare enough that it doesn't cause
+        * peformance issues. See the comment in read_events() for more detail.
+        */
+       sched_annotate_sleep();
        mutex_lock(&ctx->ring_lock);
 
        /* Access to ->ring_pages here is protected by ctx->ring_lock. */