diff options
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) |