splice: introduce FMODE_SPLICE_READ and FMODE_SPLICE_WRITE
authorJohannes Thumshirn <jthumshirn@suse.de>
Thu, 8 Dec 2016 13:04:57 +0000 (14:04 +0100)
committerStricted <info@stricted.net>
Thu, 11 Oct 2018 16:03:58 +0000 (18:03 +0200)
commitc02fedd41f62e688779c9a8f36c175a6575f53cd
tree6c9486a641c48e9eca10ba3efac0704d9ce40ddc
parente371a40c9f71df68952b948bbebede647351a0bb
splice: introduce FMODE_SPLICE_READ and FMODE_SPLICE_WRITE

Introduce FMODE_SPLICE_READ and FMODE_SPLICE_WRITE. These modes check
whether it is legal to read or write a file using splice. Both get
automatically set on regular files and are not checked when a 'struct
fileoperations' includes the splice_{read,write} methods.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
fs/open.c
fs/splice.c
include/linux/fs.h