]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] fuse: check O_DIRECT
authorMiklos Szeredi <miklos@szeredi.hu>
Fri, 30 Sep 2005 18:59:02 +0000 (11:59 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 30 Sep 2005 19:41:18 +0000 (12:41 -0700)
commitb3005c16287debfff6273e0eac196fba28f92f19
treea76e0425ca910b3f0bf6c773349004feceba27f3
parent44dd13bc8bf1b090bbf898d14c67f6d586038a5a
[PATCH] fuse: check O_DIRECT

Check O_DIRECT and return -EINVAL error in open.  dentry_open() also checks
this but only after the open method is called.  This patch optimizes away
the unnecessary upcalls in this case.

It could be a correctness issue too: if filesystem has open() with side
effect, then it should fail before doing the open, not after.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/fuse/file.c