[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZQpizwzZ/J+2CUfj@casper.infradead.org>
Date: Wed, 20 Sep 2023 04:11:11 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Andreas Gruenbacher <agruenba@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-fsdevel@...r.kernel.org, gfs2@...ts.linux.dev,
linux-nilfs@...r.kernel.org, linux-ntfs-dev@...ts.sourceforge.net,
ntfs3@...ts.linux.dev, ocfs2-devel@...ts.linux.dev,
reiserfs-devel@...r.kernel.org, linux-ext4@...r.kernel.org,
Pankaj Raghav <p.raghav@...sung.com>
Subject: Re: [PATCH 07/26] gfs2; Convert gfs2_getjdatabuf to use a folio
On Wed, Sep 20, 2023 at 12:27:08AM +0200, Andreas Gruenbacher wrote:
> Thanks,
>
> but this patch has an unwanted semicolon in the subject.
Thanks. My laptop has a dodgy shift key, so this sometimes happens.
The build quality on HP Spectre laptops has gone downhill in the last
few years.
> > - page = find_get_page_flags(mapping, index, FGP_LOCK|FGP_ACCESSED);
> > - if (!page)
> > - return NULL;
> > - if (!page_has_buffers(page)) {
> > - unlock_page(page);
> > - put_page(page);
> > + folio = __filemap_get_folio(mapping, index, FGP_LOCK | FGP_ACCESSED, 0);
> > + if (IS_ERR(folio))
> > return NULL;
> > - }
> > - /* Locate header for our buffer within our page */
> > - for (bh = page_buffers(page); bufnum--; bh = bh->b_this_page)
> > - /* Do nothing */;
> > - get_bh(bh);
> > - unlock_page(page);
> > - put_page(page);
> > + bh = folio_buffers(folio);
> > + if (bh)
> > + get_nth_bh(bh, bufnum);
>
> And we need this here:
>
> bh = get_nth_bh(bh, bufnum);
Oof. I should make that __must_check so the compiler tells me I'm being
an idiot.
Thanks!
Powered by blists - more mailing lists