ovl: disable IOCB_DIO_CALLER_COMP ovl-kiocb
authorJens Axboe <axboe@kernel.dk>
Mon, 25 Sep 2023 06:16:56 +0000 (00:16 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Sep 2023 09:32:46 +0000 (03:32 -0600)
commit8e6cfe6c30bf573d2aa5449e22520a67ff0dcfe8
tree78c454623a8623ae1b1e022a329b4fe804f1c9a3
parent6465e260f48790807eef06b583b38ca9789b6072
ovl: disable IOCB_DIO_CALLER_COMP

overlayfs copies the kiocb flags when it sets up a new kiocb to handle
a write, but it doesn't properly support dealing with the deferred
caller completions of the kiocb. This means it doesn't get the final
write completion value, and hence will complete the write with '0' as
the result.

We could support the caller completions in overlayfs, but for now let's
just disable them in the generated write kiocb.

Reported-by: Zorro Lang <zlang@redhat.com>
Link: https://lore.kernel.org/io-uring/20230924142754.ejwsjen5pvyc32l4@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com/
Fixes: 8c052fb3002e ("iomap: support IOCB_DIO_CALLER_COMP")
Acked-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/overlayfs/file.c