lkml.org 
[lkml]   [2023]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH 3/3] orangefs: use folio in orangefs_readahead()
    On Wed, Mar 15, 2023 at 01:32:33PM +0100, Pankaj Raghav wrote:
    > Use folio and its corresponding function in orangefs_readahead() so that
    > folios can be directly passed to the folio_endio().

    This is wrong; you need to drop the call to folio_put().

    > /* clean up. */
    > - while ((page = readahead_page(rac))) {
    > - folio_endio(page_folio(page), false, ret);
    > - put_page(page);
    > + while ((folio = readahead_folio(rac))) {
    > + folio_endio(folio, false, ret);
    > + folio_put(folio);
    > }

    \
     
     \ /
      Last update: 2023-03-27 01:01    [W:2.896 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site