]> git.baikalelectronics.ru Git - kernel.git/commit
ovl: simplify file splice
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 14 Dec 2020 14:26:14 +0000 (15:26 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 14 Dec 2020 14:26:14 +0000 (15:26 +0100)
commit84e4dc6a7681e19078c5072eae919f4c878b4c4d
treedd3bf6ba2a1f5adca8c5e82bb3609505c97c6438
parentb2546c6562fd6e2ee96305abaef0be612113d98a
ovl: simplify file splice

generic_file_splice_read() and iter_file_splice_write() will call back into
f_op->iter_read() and f_op->iter_write() respectively.  These already do
the real file lookup and cred override.  So the code in ovl_splice_read()
and ovl_splice_write() is redundant.

In addition the ovl_file_accessed() call in ovl_splice_write() is
incorrect, though probably harmless.

Fix by calling generic_file_splice_read() and iter_file_splice_write()
directly.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/file.c