[lkml]   [2018]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH V6 08/30] block: introduce chunk_last_segment()
I think both callers would be just as easy to understand by using
nth_page() instead of these magic helpers. E.g. for guard_bio_eod:

unsigned offset = (bv.bv_offset + bv.bv_len);
struct page *page = nth_page(bv.bv_page, offset);

zero_user(page, offset & PAGE_MASK, truncated_bytes);

 \ /
  Last update: 2018-06-11 19:20    [W:0.235 / U:2.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site