[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210422010630.GK3596236@casper.infradead.org>
Date: Thu, 22 Apr 2021 02:06:30 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Hugh Dickins <hughd@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
William Kucharski <william.kucharski@...cle.com>,
Christoph Hellwig <hch@....de>, Jan Kara <jack@...e.cz>,
Dave Chinner <dchinner@...hat.com>,
Johannes Weiner <hannes@...xchg.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Yang Shi <yang.shi@...ux.alibaba.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH 1/2] mm/filemap: fix find_lock_entries hang on 32-bit THP
On Wed, Apr 21, 2021 at 05:37:33PM -0700, Hugh Dickins wrote:
> - if (!xa_is_value(page) && PageTransHuge(page))
> - xas_set(&xas, page->index + thp_nr_pages(page));
> + if (!xa_is_value(page) && PageTransHuge(page)) {
> + unsigned int nr_pages = thp_nr_pages(page);
> +
> + /* Final THP may cross MAX_LFS_FILESIZE on 32-bit */
> + xas_set(&xas, page->index + nr_pages);
> + if (xas.xa_index < nr_pages)
> + break;
> + }
Aargh. We really need to get the multi-index support in; this works
perfectly when the xas_set() hack isn't needed any more.
Powered by blists - more mailing lists