Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147947
b: refs/heads/master
c: 2d698b0
h: refs/heads/master
i:
  147945: 8f45b54
  147943: 3957c64
v: v3
  • Loading branch information
Miklos Szeredi committed Apr 28, 2009
1 parent eb96e73 commit 48f65e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b0be46ebf72ca7478c1c4bd0153c42f90e768a03
refs/heads/master: 2d698b070382442f817813b9dd0103034e5bca81
17 changes: 8 additions & 9 deletions trunk/fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,20 +613,16 @@ static ssize_t fuse_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
return generic_file_aio_read(iocb, iov, nr_segs, pos);
}

static void fuse_write_fill(struct fuse_req *req, struct file *file,
struct fuse_file *ff, struct inode *inode,
loff_t pos, size_t count, int writepage)
static void fuse_write_fill(struct fuse_req *req, struct fuse_file *ff,
struct inode *inode, loff_t pos, size_t count)
{
struct fuse_conn *fc = get_fuse_conn(inode);
struct fuse_write_in *inarg = &req->misc.write.in;
struct fuse_write_out *outarg = &req->misc.write.out;

memset(inarg, 0, sizeof(struct fuse_write_in));
inarg->fh = ff->fh;
inarg->offset = pos;
inarg->size = count;
inarg->write_flags = writepage ? FUSE_WRITE_CACHE : 0;
inarg->flags = file ? file->f_flags : 0;
req->in.h.opcode = FUSE_WRITE;
req->in.h.nodeid = get_node_id(inode);
req->in.numargs = 2;
Expand All @@ -646,9 +642,11 @@ static size_t fuse_send_write(struct fuse_req *req, struct file *file,
fl_owner_t owner)
{
struct fuse_conn *fc = get_fuse_conn(inode);
fuse_write_fill(req, file, file->private_data, inode, pos, count, 0);
struct fuse_write_in *inarg = &req->misc.write.in;

fuse_write_fill(req, file->private_data, inode, pos, count);
inarg->flags = file->f_flags;
if (owner != NULL) {
struct fuse_write_in *inarg = &req->misc.write.in;
inarg->write_flags |= FUSE_WRITE_LOCKOWNER;
inarg->lock_owner = fuse_lock_owner_id(fc, owner);
}
Expand Down Expand Up @@ -1183,9 +1181,10 @@ static int fuse_writepage_locked(struct page *page)
req->ff = fuse_file_get(ff);
spin_unlock(&fc->lock);

fuse_write_fill(req, NULL, ff, inode, page_offset(page), 0, 1);
fuse_write_fill(req, ff, inode, page_offset(page), 0);

copy_highpage(tmp_page, page);
req->misc.write.in.write_flags |= FUSE_WRITE_CACHE;
req->in.argpages = 1;
req->num_pages = 1;
req->pages[0] = tmp_page;
Expand Down

0 comments on commit 48f65e6

Please sign in to comment.