Blob Blame History Raw
From 6c78973da0b11255d2668518ac1baba4c581811a Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Mon, 12 Sep 2022 12:25:29 +0200
Subject: [PATCH] udf: Support splicing to file
Git-commit: 6c78973da0b11255d2668518ac1baba4c581811a
Patch-mainline: v6.1-rc1
References: bsc#1210770

Add explicit support for splicing from pipe to file through
iter_file_splice_write(). Commit 36e2c7421f02 ("fs: don't allow splice
read/write without explicit ops") removed the default .splice_write
operation which effectively removed UDF support for splicing from pipe.

Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops")
Reported-by: kernel test robot <yujie.liu@intel.com>
Link: https://lore.kernel.org/r/202209081443.593ab12-yujie.liu@intel.com
Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Jan Kara <jack@suse.cz>

---
 fs/udf/file.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/udf/file.c b/fs/udf/file.c
index 09aef77269fe..5c659e23e578 100644
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -252,6 +252,7 @@ const struct file_operations udf_file_operations = {
 	.release		= udf_release_file,
 	.fsync			= generic_file_fsync,
 	.splice_read		= generic_file_splice_read,
+	.splice_write		= iter_file_splice_write,
 	.llseek			= generic_file_llseek,
 };
 
-- 
2.35.3