Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72915
b: refs/heads/master
c: bdb76ef
h: refs/heads/master
i:
  72913: 09919c9
  72911: 4197d55
v: v3
  • Loading branch information
Zach Brown authored and Linus Torvalds committed Oct 30, 2007
1 parent 2151d75 commit 4c335a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 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: e58b7dab272ecee09cd7bafb89d6b224cd17bbe3
refs/heads/master: bdb76ef5a4bc8676a81034a443f1eda450b4babb
16 changes: 6 additions & 10 deletions trunk/mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2511,21 +2511,17 @@ generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
}

retval = mapping->a_ops->direct_IO(rw, iocb, iov, offset, nr_segs);
if (retval)
goto out;

/*
* Finally, try again to invalidate clean pages which might have been
* faulted in by get_user_pages() if the source of the write was an
* mmap()ed region of the file we're writing. That's a pretty crazy
* thing to do, so we don't support it 100%. If this invalidation
* fails and we have -EIOCBQUEUED we ignore the failure.
* cached by non-direct readahead, or faulted in by get_user_pages()
* if the source of the write was an mmap'ed region of the file
* we're writing. Either one is a pretty crazy thing to do,
* so we don't support it 100%. If this invalidation
* fails, tough, the write still worked...
*/
if (rw == WRITE && mapping->nrpages) {
int err = invalidate_inode_pages2_range(mapping,
offset >> PAGE_CACHE_SHIFT, end);
if (err && retval >= 0)
retval = err;
invalidate_inode_pages2_range(mapping, offset >> PAGE_CACHE_SHIFT, end);
}
out:
return retval;
Expand Down

0 comments on commit 4c335a9

Please sign in to comment.