Commit 3865efcb authored by Linus Torvalds's avatar Linus Torvalds

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
parents b23dc5a7 ad0eab92
...@@ -911,9 +911,9 @@ size_t iov_iter_single_seg_count(const struct iov_iter *i) ...@@ -911,9 +911,9 @@ size_t iov_iter_single_seg_count(const struct iov_iter *i)
if (i->nr_segs == 1) if (i->nr_segs == 1)
return i->count; return i->count;
else if (i->type & ITER_BVEC) 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); 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); EXPORT_SYMBOL(iov_iter_single_seg_count);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment