Commit d28574e0 authored by Maxim Patlasov's avatar Maxim Patlasov Committed by Miklos Szeredi

mm: minor cleanup of iov_iter_single_seg_count()

The function does not modify iov_iter which 'i' points to.
Signed-off-by: default avatarMaxim Patlasov <mpatlasov@parallels.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
parent 85f40aec
...@@ -301,7 +301,7 @@ size_t iov_iter_copy_from_user(struct page *page, ...@@ -301,7 +301,7 @@ size_t iov_iter_copy_from_user(struct page *page,
struct iov_iter *i, unsigned long offset, size_t bytes); struct iov_iter *i, unsigned long offset, size_t bytes);
void iov_iter_advance(struct iov_iter *i, size_t bytes); void iov_iter_advance(struct iov_iter *i, size_t bytes);
int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes); int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes);
size_t iov_iter_single_seg_count(struct iov_iter *i); size_t iov_iter_single_seg_count(const struct iov_iter *i);
static inline void iov_iter_init(struct iov_iter *i, static inline void iov_iter_init(struct iov_iter *i,
const struct iovec *iov, unsigned long nr_segs, const struct iovec *iov, unsigned long nr_segs,
......
...@@ -2056,7 +2056,7 @@ EXPORT_SYMBOL(iov_iter_fault_in_readable); ...@@ -2056,7 +2056,7 @@ EXPORT_SYMBOL(iov_iter_fault_in_readable);
/* /*
* Return the count of just the current iov_iter segment. * Return the count of just the current iov_iter segment.
*/ */
size_t iov_iter_single_seg_count(struct iov_iter *i) size_t iov_iter_single_seg_count(const struct iov_iter *i)
{ {
const struct iovec *iov = i->iov; const struct iovec *iov = i->iov;
if (i->nr_segs == 1) if (i->nr_segs == 1)
......
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