From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01639C4363A for ; Fri, 9 Oct 2020 14:31:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 929A0222D9 for ; Fri, 9 Oct 2020 14:31:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="VsE23OLO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 929A0222D9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5F7F76B007E; Fri, 9 Oct 2020 10:31:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BF8406B0087; Fri, 9 Oct 2020 10:31:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 90AF36B0074; Fri, 9 Oct 2020 10:31:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0038.hostedemail.com [216.40.44.38]) by kanga.kvack.org (Postfix) with ESMTP id 2FDE26B0083 for ; Fri, 9 Oct 2020 10:31:15 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id CA18B180AD807 for ; Fri, 9 Oct 2020 14:31:14 +0000 (UTC) X-FDA: 77352624468.30.dolls06_2a0ad69271e1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 9DE0E180B3C85 for ; Fri, 9 Oct 2020 14:31:14 +0000 (UTC) X-HE-Tag: dolls06_2a0ad69271e1 X-Filterd-Recvd-Size: 2861 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Fri, 9 Oct 2020 14:31:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=RIb1gQ+A64FbhPeJkfhHPdkd0Jjt6Z+sspMIve+fcDU=; b=VsE23OLOrUsnE7PhGHwfx4AvQD ZxkA8063qfbOb72uym0CvuEdjOdRn7oO/of7SRBBhcxjg9XTVL1ic5NG9xyRTX+fd2YtHU6noe+tR uEp06xjPiOqssHfOpiCZbZjqG05aMT4oOo9biqN01offaQ9iApy0o0e4MMkooCZAHQAeyjeBIDN8e KJorn95GK3/JkF8UaucM0gBtV/Vb6J3DVeBdt7Q6Dy7Pz7UU0qxP6J4lpYi/+bz+kDQ9hjZSAe76U jlZ6/O0bb9U/qtqCLSWlYuFcsp/+4PYyUSBphJDs2Y1Tzrf2WkgaY0Ow7NhEPSzbvdY53XI8klRju ymkLE0qQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQtQL-0005vk-SX; Fri, 09 Oct 2020 14:31:09 +0000 From: "Matthew Wilcox (Oracle)" To: linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-afs@lists.infradead.org, ceph-devel@vger.kernel.org, linux-cifs@vger.kernel.org, ecryptfs@vger.kernel.org, linux-um@lists.infradead.org, linux-mtd@lists.infradead.org, Richard Weinberger , linux-xfs@vger.kernel.org Subject: [PATCH v2 11/16] jffs2: Tell the VFS that readpage was synchronous Date: Fri, 9 Oct 2020 15:30:59 +0100 Message-Id: <20201009143104.22673-12-willy@infradead.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20201009143104.22673-1-willy@infradead.org> References: <20201009143104.22673-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The jffs2 readpage implementation was already synchronous, so use AOP_UPDATED_PAGE to avoid cycling the page lock. Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Richard Weinberger --- fs/jffs2/file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c index f8fb89b10227..959a74027041 100644 --- a/fs/jffs2/file.c +++ b/fs/jffs2/file.c @@ -116,15 +116,17 @@ int jffs2_do_readpage_unlock(void *data, struct pag= e *pg) return ret; } =20 - static int jffs2_readpage (struct file *filp, struct page *pg) { struct jffs2_inode_info *f =3D JFFS2_INODE_INFO(pg->mapping->host); int ret; =20 mutex_lock(&f->sem); - ret =3D jffs2_do_readpage_unlock(pg->mapping->host, pg); + ret =3D jffs2_do_readpage_nolock(pg->mapping->host, pg); mutex_unlock(&f->sem); + if (!ret) + return AOP_UPDATED_PAGE; + unlock_page(pg); return ret; } =20 --=20 2.28.0