aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/aio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/aio.c b/fs/aio.c
index 97bc62cbe2da..5f2e9c6c328e 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1111,6 +1111,12 @@ static long aio_read_events_ring(struct kioctx *ctx,
1111 tail = ring->tail; 1111 tail = ring->tail;
1112 kunmap_atomic(ring); 1112 kunmap_atomic(ring);
1113 1113
1114 /*
1115 * Ensure that once we've read the current tail pointer, that
1116 * we also see the events that were stored up to the tail.
1117 */
1118 smp_rmb();
1119
1114 pr_debug("h%u t%u m%u\n", head, tail, ctx->nr_events); 1120 pr_debug("h%u t%u m%u\n", head, tail, ctx->nr_events);
1115 1121
1116 if (head == tail) 1122 if (head == tail)