From: Al Viro Date: Tue, 11 Feb 2014 22:49:24 +0000 (-0500) Subject: replace checking for ->read/->aio_read presence with check in ->f_mode X-Git-Tag: omap-for-v3.16/fixes-against-rc1~45^2~44 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f7f25e82d54870df24d415a7007fbd327da027b;p=pandora-kernel.git 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 --- Reading git-diff-tree failed