> if (unlikely(error)) { > + unsigned int pageoff = offset_in_page(file_offset); > + /* > + * Let the filesystem know what portion of the current page > + * failed to map. If the page wasn't been added to ioend, it > + * won't be affected by I/O completion and we must unlock it > + * now. > + */ > + if (wpc->ops->discard_page) > + wpc->ops->discard_page(page, pageoff); I don't think we need the pageoff variable here. Also it would seem more natural to pass the full file_offset offset instead of having to recreate it in the file system.