]> git.baikalelectronics.ru Git - kernel.git/commit
iomap: move the iomap_dio_rw ->end_io callback into a structure
authorChristoph Hellwig <hch@lst.de>
Thu, 19 Sep 2019 22:32:45 +0000 (15:32 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 19 Sep 2019 22:32:45 +0000 (15:32 -0700)
commite8097a4285e80bd5cc78bd9f5b269139b4822317
treecd50fb73997130df5bd87700861aae7663702ed4
parent9deaa426150c1e8cba68788d899188e09fed3c55
iomap: move the iomap_dio_rw ->end_io callback into a structure

Add a new iomap_dio_ops structure that for now just contains the end_io
handler.  This avoid storing the function pointer in a mutable structure,
which is a possible exploit vector for kernel code execution, and prepares
for adding a submit_io handler that btrfs needs.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/iomap/direct-io.c
fs/xfs/xfs_file.c
include/linux/iomap.h