diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-28 13:49:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-28 13:49:34 -0400 |
commit | f362f98e7c445643d27c610bb7a86b79727b592e (patch) | |
tree | 399d9ebccdfbdfe9690ab1403a001d6f08e54b41 /mm | |
parent | f793f2961170c0b49c1650e69e7825484159ce62 (diff) | |
parent | f3c7691e8d30d88899b514675c7c86d19057b5fd (diff) |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs-queue
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs-queue: (21 commits)
leases: fix write-open/read-lease race
nfs: drop unnecessary locking in llseek
ext4: replace cut'n'pasted llseek code with generic_file_llseek_size
vfs: add generic_file_llseek_size
vfs: do (nearly) lockless generic_file_llseek
direct-io: merge direct_io_walker into __blockdev_direct_IO
direct-io: inline the complete submission path
direct-io: separate map_bh from dio
direct-io: use a slab cache for struct dio
direct-io: rearrange fields in dio/dio_submit to avoid holes
direct-io: fix a wrong comment
direct-io: separate fields only used in the submission path from struct dio
vfs: fix spinning prevention in prune_icache_sb
vfs: add a comment to inode_permission()
vfs: pass all mask flags check_acl and posix_acl_permission
vfs: add hex format for MAY_* flag values
vfs: indicate that the permission functions take all the MAY_* flags
compat: sync compat_stats with statfs.
vfs: add "device" tag to /proc/self/mountstats
cleanup: vfs: small comment fix for block_invalidatepage
...
Fix up trivial conflict in fs/gfs2/file.c (llseek changes)
Diffstat (limited to 'mm')
-rw-r--r-- | mm/filemap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 7771871fa353..5cf820a7c8ec 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -2115,6 +2115,7 @@ void iov_iter_advance(struct iov_iter *i, size_t bytes) | |||
2115 | } else { | 2115 | } else { |
2116 | const struct iovec *iov = i->iov; | 2116 | const struct iovec *iov = i->iov; |
2117 | size_t base = i->iov_offset; | 2117 | size_t base = i->iov_offset; |
2118 | unsigned long nr_segs = i->nr_segs; | ||
2118 | 2119 | ||
2119 | /* | 2120 | /* |
2120 | * The !iov->iov_len check ensures we skip over unlikely | 2121 | * The !iov->iov_len check ensures we skip over unlikely |
@@ -2130,11 +2131,13 @@ void iov_iter_advance(struct iov_iter *i, size_t bytes) | |||
2130 | base += copy; | 2131 | base += copy; |
2131 | if (iov->iov_len == base) { | 2132 | if (iov->iov_len == base) { |
2132 | iov++; | 2133 | iov++; |
2134 | nr_segs--; | ||
2133 | base = 0; | 2135 | base = 0; |
2134 | } | 2136 | } |
2135 | } | 2137 | } |
2136 | i->iov = iov; | 2138 | i->iov = iov; |
2137 | i->iov_offset = base; | 2139 | i->iov_offset = base; |
2140 | i->nr_segs = nr_segs; | ||
2138 | } | 2141 | } |
2139 | } | 2142 | } |
2140 | EXPORT_SYMBOL(iov_iter_advance); | 2143 | EXPORT_SYMBOL(iov_iter_advance); |