On Thu, May 05, 2022 at 11:06:50AM +0300, Nikolay Borisov wrote: >> @@ -520,6 +520,14 @@ __iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, >> dio->submit.waiter = current; >> dio->submit.poll_bio = NULL; >> + /* >> + * Transfer the private data that was passed by the caller to the >> + * iomap_iter, and clear it in the iocb, as iocb->private will be >> + * used for polled bio completion later. >> + */ >> + iomi.private = iocb->private; >> + WRITE_ONCE(iocb->private, NULL); > > nit: Why use WRITE_ONCE here? Generaly when it's used it will suggest to > the reader something funny is going on with accessing that variable without > holding a particular lock? Because we use WRITE_ONCE on iocb->private later on when we use it to store the bio that is polled for, and we really want the store that clears it to NULL to be done before we start dealing with bio submission.