]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: reject O_DIRECT flag also in fuse_create
authorCsaba Henk <csaba@gluster.com>
Fri, 27 Nov 2009 14:00:14 +0000 (19:30 +0530)
committerMiklos Szeredi <mszeredi@suse.cz>
Fri, 27 Nov 2009 15:37:13 +0000 (16:37 +0100)
commite13d9ebfeae86a3361842cfa49cc7320b24f5a91
treee0f6708e1bb274a2204919dbcc698be5f5880f0c
parent39bfcc6c679da0ba40f9d186140a8bf7d4c73465
fuse: reject O_DIRECT flag also in fuse_create

The comment in fuse_open about O_DIRECT:

  "VFS checks this, but only _after_ ->open()"

also holds for fuse_create, however, the same kind of check was missing there.

As an impact of this bug, open(newfile, O_RDWR|O_CREAT|O_DIRECT) fails, but a
stub newfile will remain if the fuse server handled the implied FUSE_CREATE
request appropriately.

Other impact: in the above situation ima_file_free() will complain to open/free
imbalance if CONFIG_IMA is set.

Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Harshavardhana <harsha@gluster.com>
Cc: stable@kernel.org
fs/fuse/dir.c