Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177418
b: refs/heads/master
c: c05c4ed
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Al Viro committed Dec 16, 2009
1 parent 1aa69a0 commit 1d1aabe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 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: 2cfd30adf6130dab3fbb130eb5f7b1fd42a70e31
refs/heads/master: c05c4edd876b7ae92787d1295868afcb89b6a348
15 changes: 1 addition & 14 deletions trunk/mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,6 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
size_t count, ssize_t written)
{
struct file *file = iocb->ki_filp;
struct address_space *mapping = file->f_mapping;
ssize_t status;
struct iov_iter i;

Expand All @@ -2252,15 +2251,6 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
*ppos = pos + status;
}

/*
* If we get here for O_DIRECT writes then we must have fallen through
* to buffered writes (block instantiation inside i_size). So we sync
* the file data here, to try to honour O_DIRECT expectations.
*/
if (unlikely(file->f_flags & O_DIRECT) && written)
status = filemap_write_and_wait_range(mapping,
pos, pos + written - 1);

return written ? written : status;
}
EXPORT_SYMBOL(generic_file_buffered_write);
Expand Down Expand Up @@ -2359,10 +2349,7 @@ ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
* semantics.
*/
endbyte = pos + written_buffered - written - 1;
err = do_sync_mapping_range(file->f_mapping, pos, endbyte,
SYNC_FILE_RANGE_WAIT_BEFORE|
SYNC_FILE_RANGE_WRITE|
SYNC_FILE_RANGE_WAIT_AFTER);
err = filemap_write_and_wait_range(file->f_mapping, pos, endbyte);
if (err == 0) {
written = written_buffered;
invalidate_mapping_pages(mapping,
Expand Down

0 comments on commit 1d1aabe

Please sign in to comment.