summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-11-14 10:48:16 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-11-14 10:48:16 -0800
commit3865efcb14f46a5e01852d30a34b2c0dce076b3e (patch)
tree7d090328fecc52bb58bafe979e779649f65e0ea4 /mm
parentb23dc5a7cc6ebc9a0d57351da7a0e8454c9ffea3 (diff)
parentad0eab9293485d1c06237e9249f6d4dfa3d93d4d (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fix from Al Viro: "Fix for a really embarrassing braino in iov_iter. Kudos to paulus..." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: Fix thinko in iov_iter_single_seg_count
Diffstat (limited to 'mm')
-rw-r--r--mm/iov_iter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/iov_iter.c b/mm/iov_iter.c
index eafcf60f6b83..e34a3cb6aad6 100644
--- a/mm/iov_iter.c
+++ b/mm/iov_iter.c
@@ -911,9 +911,9 @@ size_t iov_iter_single_seg_count(const struct iov_iter *i)
if (i->nr_segs == 1)
return i->count;
else if (i->type & ITER_BVEC)
- return min(i->count, i->iov->iov_len - i->iov_offset);
- else
return min(i->count, i->bvec->bv_len - i->iov_offset);
+ else
+ return min(i->count, i->iov->iov_len - i->iov_offset);
}
EXPORT_SYMBOL(iov_iter_single_seg_count);