Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190559
b: refs/heads/master
c: 6b933c8
h: refs/heads/master
i:
  190557: d2b553f
  190555: 605748f
  190551: ef5f324
  190543: 54b1688
  190527: 73bbcd9
v: v3
  • Loading branch information
Li Dongyang authored and Joel Becker committed Apr 30, 2010
1 parent 9013423 commit 3432207
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 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: f9221fd80343285514568da6c5dbda0f87109de8
refs/heads/master: 6b933c8e6f1a2f3118082c455eef25f9b1ac7b45
25 changes: 14 additions & 11 deletions trunk/fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1982,18 +1982,18 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
/* communicate with ocfs2_dio_end_io */
ocfs2_iocb_set_rw_locked(iocb, rw_level);

if (direct_io) {
ret = generic_segment_checks(iov, &nr_segs, &ocount,
VERIFY_READ);
if (ret)
goto out_dio;
ret = generic_segment_checks(iov, &nr_segs, &ocount,
VERIFY_READ);
if (ret)
goto out_dio;

count = ocount;
ret = generic_write_checks(file, ppos, &count,
S_ISBLK(inode->i_mode));
if (ret)
goto out_dio;
count = ocount;
ret = generic_write_checks(file, ppos, &count,
S_ISBLK(inode->i_mode));
if (ret)
goto out_dio;

if (direct_io) {
written = generic_file_direct_write(iocb, iov, &nr_segs, *ppos,
ppos, count, ocount);
if (written < 0) {
Expand All @@ -2008,7 +2008,10 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
goto out_dio;
}
} else {
written = __generic_file_aio_write(iocb, iov, nr_segs, ppos);
current->backing_dev_info = file->f_mapping->backing_dev_info;
written = generic_file_buffered_write(iocb, iov, nr_segs, *ppos,
ppos, count, 0);
current->backing_dev_info = NULL;
}

out_dio:
Expand Down

0 comments on commit 3432207

Please sign in to comment.