diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 15:04:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 15:04:02 -0500 |
commit | bac5e54c29f352d962a2447d22735316b347b9f1 (patch) | |
tree | 7642993fa93164835ffaa2dacd341388193f1979 /mm/filemap.c | |
parent | 529e89430d6c0d64db8ac474cb95e68e2527c79a (diff) | |
parent | c05c4edd876b7ae92787d1295868afcb89b6a348 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (38 commits)
direct I/O fallback sync simplification
ocfs: stop using do_sync_mapping_range
cleanup blockdev_direct_IO locking
make generic_acl slightly more generic
sanitize xattr handler prototypes
libfs: move EXPORT_SYMBOL for d_alloc_name
vfs: force reval of target when following LAST_BIND symlinks (try #7)
ima: limit imbalance msg
Untangling ima mess, part 3: kill dead code in ima
Untangling ima mess, part 2: deal with counters
Untangling ima mess, part 1: alloc_file()
O_TRUNC open shouldn't fail after file truncation
ima: call ima_inode_free ima_inode_free
IMA: clean up the IMA counts updating code
ima: only insert at inode creation time
ima: valid return code from ima_inode_alloc
fs: move get_empty_filp() deffinition to internal.h
Sanitize exec_permission_lite()
Kill cached_lookup() and real_lookup()
Kill path_lookup_open()
...
Trivial conflicts in fs/direct-io.c
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 8b4d88f9249e..96ac6b0eb6cb 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -2240,7 +2240,6 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov, | |||
2240 | size_t count, ssize_t written) | 2240 | size_t count, ssize_t written) |
2241 | { | 2241 | { |
2242 | struct file *file = iocb->ki_filp; | 2242 | struct file *file = iocb->ki_filp; |
2243 | struct address_space *mapping = file->f_mapping; | ||
2244 | ssize_t status; | 2243 | ssize_t status; |
2245 | struct iov_iter i; | 2244 | struct iov_iter i; |
2246 | 2245 | ||
@@ -2252,15 +2251,6 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov, | |||
2252 | *ppos = pos + status; | 2251 | *ppos = pos + status; |
2253 | } | 2252 | } |
2254 | 2253 | ||
2255 | /* | ||
2256 | * If we get here for O_DIRECT writes then we must have fallen through | ||
2257 | * to buffered writes (block instantiation inside i_size). So we sync | ||
2258 | * the file data here, to try to honour O_DIRECT expectations. | ||
2259 | */ | ||
2260 | if (unlikely(file->f_flags & O_DIRECT) && written) | ||
2261 | status = filemap_write_and_wait_range(mapping, | ||
2262 | pos, pos + written - 1); | ||
2263 | |||
2264 | return written ? written : status; | 2254 | return written ? written : status; |
2265 | } | 2255 | } |
2266 | EXPORT_SYMBOL(generic_file_buffered_write); | 2256 | EXPORT_SYMBOL(generic_file_buffered_write); |
@@ -2359,10 +2349,7 @@ ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
2359 | * semantics. | 2349 | * semantics. |
2360 | */ | 2350 | */ |
2361 | endbyte = pos + written_buffered - written - 1; | 2351 | endbyte = pos + written_buffered - written - 1; |
2362 | err = do_sync_mapping_range(file->f_mapping, pos, endbyte, | 2352 | err = filemap_write_and_wait_range(file->f_mapping, pos, endbyte); |
2363 | SYNC_FILE_RANGE_WAIT_BEFORE| | ||
2364 | SYNC_FILE_RANGE_WRITE| | ||
2365 | SYNC_FILE_RANGE_WAIT_AFTER); | ||
2366 | if (err == 0) { | 2353 | if (err == 0) { |
2367 | written = written_buffered; | 2354 | written = written_buffered; |
2368 | invalidate_mapping_pages(mapping, | 2355 | invalidate_mapping_pages(mapping, |