Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212762
b: refs/heads/master
c: b890823
h: refs/heads/master
v: v3
  • Loading branch information
Tao Ma committed Aug 12, 2010
1 parent 8740731 commit 7acaa18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: 0378da0fda6edf5aaffda6f1248a78986bd955b5
refs/heads/master: b890823635e022467b924e3d9da8c5166a4e349c
9 changes: 6 additions & 3 deletions trunk/fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2053,6 +2053,7 @@ int ocfs2_check_range_for_refcount(struct inode *inode, loff_t pos,
}

static int ocfs2_prepare_inode_for_refcount(struct inode *inode,
struct file *file,
loff_t pos, size_t count,
int *meta_level)
{
Expand All @@ -2078,14 +2079,15 @@ static int ocfs2_prepare_inode_for_refcount(struct inode *inode,
return ret;
}

static int ocfs2_prepare_inode_for_write(struct dentry *dentry,
static int ocfs2_prepare_inode_for_write(struct file *file,
loff_t *ppos,
size_t count,
int appending,
int *direct_io,
int *has_refcount)
{
int ret = 0, meta_level = 0;
struct dentry *dentry = file->f_path.dentry;
struct inode *inode = dentry->d_inode;
loff_t saved_pos, end;

Expand Down Expand Up @@ -2141,6 +2143,7 @@ static int ocfs2_prepare_inode_for_write(struct dentry *dentry,
meta_level = -1;

ret = ocfs2_prepare_inode_for_refcount(inode,
file,
saved_pos,
count,
&meta_level);
Expand Down Expand Up @@ -2255,7 +2258,7 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
}

can_do_direct = direct_io;
ret = ocfs2_prepare_inode_for_write(file->f_path.dentry, ppos,
ret = ocfs2_prepare_inode_for_write(file, ppos,
iocb->ki_left, appending,
&can_do_direct, &has_refcount);
if (ret < 0) {
Expand Down Expand Up @@ -2385,7 +2388,7 @@ static int ocfs2_splice_to_file(struct pipe_inode_info *pipe,
{
int ret;

ret = ocfs2_prepare_inode_for_write(out->f_path.dentry, &sd->pos,
ret = ocfs2_prepare_inode_for_write(out, &sd->pos,
sd->total_len, 0, NULL, NULL);
if (ret < 0) {
mlog_errno(ret);
Expand Down

0 comments on commit 7acaa18

Please sign in to comment.