Hi Andrew, Today's linux-next merge of the akpm-current tree got a conflict in mm/filemap.c between commit 6c45b468c3e6 ("s: pull iov_iter use higher up the stack") from the aio-direct tree and commit ebde8e7e937d ("mm: drop actor argument of do_generic_file_read()") from the akpm-current tree. I fixed it up (see below - thanks, Dave, for the hint patch) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwell sfr@xxxxxxxxxxxxxxxx diff --cc mm/filemap.c index 45cfcfc,ae5cc01..0000000 --- a/mm/filemap.c +++ b/mm/filemap.c @@@ -1198,13 -1201,14 +1201,14 @@@ page_ok * Ok, we have the page, and it's up-to-date, so * now we can copy it to user space... * - * The actor routine returns how many bytes were actually used.. - * The file_read_actor routine returns how many bytes were ++ * The file_read_iter_actor routine returns how many bytes were + * actually used.. * NOTE! This may not be the same as how much of a user buffer * we filled up (we may be padding etc), so we can only update * "pos" here (the actor routine has to update the user buffer * pointers and the remaining count). */ - ret = actor(desc, page, offset, nr); - ret = file_read_actor(desc, page, offset, nr); ++ ret = file_read_iter_actor(desc, page, offset, nr); offset += ret; index += offset >> PAGE_CACHE_SHIFT; offset &= ~PAGE_CACHE_MASK; @@@ -1424,15 -1457,39 +1428,15 @@@ generic_file_read_iter(struct kiocb *io } } - count = retval; - for (seg = 0; seg < nr_segs; seg++) { - read_descriptor_t desc; - loff_t offset = 0; - - /* - * If we did a short DIO read we need to skip the section of the - * iov that we've already read data into. - */ - if (count) { - if (count > iov[seg].iov_len) { - count -= iov[seg].iov_len; - continue; - } - offset = count; - count = 0; - } - - desc.written = 0; - desc.arg.buf = iov[seg].iov_base + offset; - desc.count = iov[seg].iov_len - offset; - if (desc.count == 0) - continue; - desc.error = 0; - do_generic_file_read(filp, ppos, &desc); - retval += desc.written; - if (desc.error) { - retval = retval ?: desc.error; - break; - } - if (desc.count > 0) - break; - } + desc.written = 0; + desc.arg.data = iter; + desc.count = count; + desc.error = 0; - do_generic_file_read(filp, ppos, &desc, file_read_iter_actor); ++ do_generic_file_read(filp, ppos, &desc); + if (desc.written) + retval = desc.written; + else + retval = desc.error; out: return retval; }
Attachment:
pgp_AN32Afk6T.pgp
Description: PGP signature