proc mountinfo: make splice available again

Linux Kernel / Linux Kernel - Linus Torvalds [linux-foundation.org] - 27 December 2020 20:00 UTC

Since commit 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") we've required that file operation structures explicitly enable splice support, rather than falling back to the default handlers.

Most /proc files use the indirect 'struct proc_ops' to describe their file operations, and were fixed up to support splice earlier in commits 40be821d627c..b24c30c67863, but the mountinfo files interact with the
VFS directly using their own 'struct file_operations' and got missed as a result.

This adds the necessary support for splice to work for /proc/*/mountinfo and friends.

14e3e989f6a5 proc mountinfo: make splice available again
fs/proc_namespace.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

Upstream: git.kernel.org


  • Share