[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200426131730.8438-1-rafal.hibner@secom.com.pl>
Date: Sun, 26 Apr 2020 15:17:30 +0200
From: Rafał Hibner <rafal.hibner@...om.com.pl>
To: unlisted-recipients:; (no To-header on input)
Cc: Rafał Hibner <rafal.hibner@...om.com.pl>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org (open list:FILESYSTEMS (VFS and
infrastructure)), linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] fs: Allow splicing from character device
Splicing from character devices should be enabled. It allows for
efficient (ZEROCOPY) bulk data tranfers from device.
---
fs/splice.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/splice.c b/fs/splice.c
index 4735defc46..306d11c5ea 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -920,7 +920,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
* piped splicing for that!
*/
i_mode = file_inode(in)->i_mode;
- if (unlikely(!S_ISREG(i_mode) && !S_ISBLK(i_mode)))
+ if (unlikely(!S_ISREG(i_mode) && !S_ISBLK(i_mode) && !S_ISCHR(i_mode)))
return -EINVAL;
/*
--
2.24.1
Powered by blists - more mailing lists