* [PATCH] fs: Allow splicing from character device
@ 2020-04-26 13:17 Rafał Hibner
0 siblings, 0 replies; only message in thread
From: Rafał Hibner @ 2020-04-26 13:17 UTC (permalink / raw)
Cc: Rafał Hibner, Alexander Viro,
open list:FILESYSTEMS (VFS and infrastructure),
open list
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-26 13:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-26 13:17 [PATCH] fs: Allow splicing from character device Rafał Hibner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).