diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2007-11-28 19:22:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-29 12:24:54 -0500 |
commit | a6643094e73247c1ebd36816f494f631fa7be348 (patch) | |
tree | 11ba2e666b6fea1cdf579616d6a04b0afd24f61c /fs/fuse/dir.c | |
parent | 7dca9fd39f7d4605ac178a67bb1772381056917d (diff) |
fuse: pass open flags to read and write
Some open flags (O_APPEND, O_DIRECT) can be changed with fcntl(F_SETFL, ...)
after open, but fuse currently only sends the flags to userspace in open.
To make it possible to correcly handle changing flags, send the
current value to userspace in each read and write.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r-- | fs/fuse/dir.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index c84f825b57e7..dfc32dc97f7f 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c | |||
@@ -964,7 +964,6 @@ static int fuse_readdir(struct file *file, void *dstbuf, filldir_t filldir) | |||
964 | struct page *page; | 964 | struct page *page; |
965 | struct inode *inode = file->f_path.dentry->d_inode; | 965 | struct inode *inode = file->f_path.dentry->d_inode; |
966 | struct fuse_conn *fc = get_fuse_conn(inode); | 966 | struct fuse_conn *fc = get_fuse_conn(inode); |
967 | struct fuse_file *ff = file->private_data; | ||
968 | struct fuse_req *req; | 967 | struct fuse_req *req; |
969 | 968 | ||
970 | if (is_bad_inode(inode)) | 969 | if (is_bad_inode(inode)) |
@@ -981,7 +980,7 @@ static int fuse_readdir(struct file *file, void *dstbuf, filldir_t filldir) | |||
981 | } | 980 | } |
982 | req->num_pages = 1; | 981 | req->num_pages = 1; |
983 | req->pages[0] = page; | 982 | req->pages[0] = page; |
984 | fuse_read_fill(req, ff, inode, file->f_pos, PAGE_SIZE, FUSE_READDIR); | 983 | fuse_read_fill(req, file, inode, file->f_pos, PAGE_SIZE, FUSE_READDIR); |
985 | request_send(fc, req); | 984 | request_send(fc, req); |
986 | nbytes = req->out.args[0].size; | 985 | nbytes = req->out.args[0].size; |
987 | err = req->out.h.error; | 986 | err = req->out.h.error; |