io_uring: honor original task RLIMIT_FSIZE
authorJens Axboe <axboe@kernel.dk>
Fri, 20 Mar 2020 17:23:41 +0000 (11:23 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 20 Mar 2020 17:41:23 +0000 (11:41 -0600)
commit4ed734b0d0913e566a9d871e15d24eb240f269f7
tree5ca3d7ceb203b4b1cca8b5a02b04a366f0e7ac21
parent60cf46ae605446feb0c43c472c0fd1af4cd96231
io_uring: honor original task RLIMIT_FSIZE

With the previous fixes for number of files open checking, I added some
debug code to see if we had other spots where we're checking rlimit()
against the async io-wq workers. The only one I found was file size
checking, which we should also honor.

During write and fallocate prep, store the max file size and override
that for the current ask if we're in io-wq worker context.

Cc: stable@vger.kernel.org # 5.1+
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c