]> git.baikalelectronics.ru Git - kernel.git/commit
replace checking for ->read/->aio_read presence with check in ->f_mode
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 11 Feb 2014 22:49:24 +0000 (17:49 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 6 May 2014 21:32:55 +0000 (17:32 -0400)
commit16b70e782ed86b9abefc19e386e07ebb6206e93c
treebac50bd31cd0582a873e1429271299536fb768bc
parentc0bd54f924facc821ad9c7b04ab43aff3bb0133d
replace checking for ->read/->aio_read presence with check in ->f_mode

Since we are about to introduce new methods (read_iter/write_iter), the
tests in a bunch of places would have to grow inconveniently.  Check
once (at open() time) and store results in ->f_mode as FMODE_CAN_READ
and FMODE_CAN_WRITE resp.  It might end up being a temporary measure -
once everything switches from ->aio_{read,write} to ->{read,write}_iter
it might make sense to return to open-coded checks.  We'll see...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/mtd/nand/nandsim.c
drivers/usb/gadget/storage_common.c
fs/file_table.c
fs/open.c
fs/read_write.c
include/linux/fs.h