]> git.baikalelectronics.ru Git - kernel.git/commit
target/file: allocate the bvec array as part of struct target_core_file_cmd
authorChristoph Hellwig <hch@lst.de>
Sat, 9 Jan 2021 16:03:00 +0000 (16:03 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jan 2021 15:58:24 +0000 (08:58 -0700)
commit3945b7a915519f8fdacf5879a38c6c8901d4a7ff
tree65ebec32ebd4f1472a2d3ded3de72dc7610dd86b
parentc493ee6c18aecfa3eaf042e94d2d3e6a9974901d
target/file: allocate the bvec array as part of struct target_core_file_cmd

This saves one memory allocation, and ensures the bvecs aren't freed
before the AIO completion.  This will allow the lower level code to be
optimized so that it can avoid allocating another bvec array.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/target/target_core_file.c