From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="uAQoscHU" Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABAAFAD for ; Tue, 12 Dec 2023 22:53:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=iyTfmEfMb8ETxO+V3m8JJLVNN90C+GRLzHjKoOmHvw0=; b=uAQoscHU/vnHyNs0+i9lnVnccD E3CoReKVSf7W+VPj+QUFkU2QtBQrMWe0u7rSis1UhD4bfeWILMkw0ivMv1GoJvGM2mnRHTDQWj9zj vPegC8Hxr1iLKdG8p5Mqdj9GRV4MCYK3UZ2eWSbve+k+pVLYa+lLpSLZhIZHw7ARngH4AHuoYU/2G fZcKj1JJL6ktM201V0E0XlUKmXH8V3/DMvD2Ba5DIQqSlye75yHW8OrYnQ6DaAqx4MvU1qvPzQY1L PU6ebb290AShr0HH5hr57tFh/HufnbCqY9NQa313Zg17af2JCeGwC5ZgqMM57osMkjvmae9uBcjWY DLyF34gg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1rDJ7M-00BgWG-35; Wed, 13 Dec 2023 06:53:17 +0000 Date: Wed, 13 Dec 2023 06:53:16 +0000 From: Al Viro To: linux-fsdevel@vger.kernel.org Cc: Evgeniy Dushistov , "Fabio M. De Francesco" , Matthew Wilcox Subject: Re: [patches][cft] ufs stuff Message-ID: <20231213065316.GK1674809@ZenIV> References: <20231213031639.GJ1674809@ZenIV> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231213031639.GJ1674809@ZenIV> Sender: Al Viro On Wed, Dec 13, 2023 at 03:16:39AM +0000, Al Viro wrote: > More old stuff, this time UFS one. Part of that is > yet another kmap_local_page() conversion, part - assorted > cleanups. > It seems to survive local beating, but it needs > more review and testing. Sigh... That it does - especially since a bit more testing has caught this (in mainline): [PATCH] fix ufs_get_locked_folio() breakage filemap_lock_folio() returns ERR_PTR(-ENOENT) if the thing is not in cache - not NULL like find_lock_page() used to. Fixes: 5fb7bd50b351 "ufs: add ufs_get_locked_folio and ufs_put_locked_folio" Signed-off-by: Al Viro --- diff --git a/fs/ufs/util.c b/fs/ufs/util.c index 535c7ee80a10..f0e906ab4ddd 100644 --- a/fs/ufs/util.c +++ b/fs/ufs/util.c @@ -199,7 +199,7 @@ struct folio *ufs_get_locked_folio(struct address_space *mapping, { struct inode *inode = mapping->host; struct folio *folio = filemap_lock_folio(mapping, index); - if (!folio) { + if (IS_ERR(folio)) { folio = read_mapping_folio(mapping, index, NULL); if (IS_ERR(folio)) {