Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp556869pxk; Thu, 17 Sep 2020 09:52:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydiskIkqWDS6Nz+z3oC4ozAY4v27jQKay3qHLkJCLO/AGbQV5ryAH3pI227DRU1divWUf4 X-Received: by 2002:a17:906:b24e:: with SMTP id ce14mr31230300ejb.494.1600361542936; Thu, 17 Sep 2020 09:52:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600361542; cv=none; d=google.com; s=arc-20160816; b=h2Bhbqa3LX4rbD/PXJEgoML70zDt57mTS0ab44oj+WVQ5/HaZyLLEZr5b4n+JV1xWa dgStg93IqzoBqY0nWD7QnOrBo+R/wvFhdUZqUuzm4ZMb8rv49trhnLFs9VTd8ONtj83a wgeOvhKqBFiHsnJu5Bo25B+ZfXzv21k/9cVOlrcb4BkJK/p9J1c9br8xXI5xLV7ApwDG U2rkL30ertpkVNCk4XqOw5rLTWVS04sEPkKu5jabDoy2uUvMD4CnFvkCf+TNCVR34f5+ 2R2W+GGqbt/CKKC15tMwwedqDCBGdgB69VptnVxBK5oOX+pFyZ98xmmnD+JabS70atMz wesA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=wLAV4OTHL26auA7sA0r9nIrRyEfjAZaupZCV0H9QcAM=; b=zMBo0juCq2Sl5hihxwDmNTmdC9fA4u+coiDXqNdgDch4WKz6kHW8FMt4t/UlaJJC/o 5KmbGqGZZSDEViBf76j0CdFbO8ua4zH56oSbE94K8PnLKbPnuu7LkIz0xmuXgX3+Ty5M FK1owF6UmZ6diRypB5iEiYjnpk6fyFfUnlGXOwcR2eJHqRGLt6cnhMIo/GC9SfNP4jTN wXA1lTprA81FUoZP0pQtNLHCSAqQmnCkeFpvH0g2jsusgRi7GymrNIEO+Aa04ocUYULD dIOCUs71tOUbCLF7IFkvuzfcgiFwWm6qxzs45x3NcuZCnTpXO/FDHjR2J3AJue2/N8Bk +K/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=y+iGlgpC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gl17si302425ejb.311.2020.09.17.09.51.58; Thu, 17 Sep 2020 09:52:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=y+iGlgpC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728679AbgIQQuj (ORCPT + 99 others); Thu, 17 Sep 2020 12:50:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:54870 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728640AbgIQQtn (ORCPT ); Thu, 17 Sep 2020 12:49:43 -0400 Received: from tleilax.poochiereds.net (68-20-15-154.lightspeed.rlghnc.sbcglobal.net [68.20.15.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 650562220E; Thu, 17 Sep 2020 16:49:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600361382; bh=sF5GNWOZkQ3nf3+Th5gnQt2xcpsdwKBCS7zrVGfmbVw=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=y+iGlgpCeM9xb9d27IMJV7+wkEMiK0mQoV9W7l5UCg8sFTmZkgM99uNvIc2+GWqlH 0ZPlY/toTe9JazTgGCZZDIpYPmlLHd2V1m/PsaZcDqBuvctHhOeuwFRx8Pao5bfxG/ 9CS6yNA1rBp1Aud48qlKW00CelvRgOeuZ6WNzkHg= Message-ID: <57d35fdb5ea646f96b70fd8b8a29434761c3f1d3.camel@kernel.org> Subject: Re: [PATCH 04/13] ceph: Tell the VFS that readpage was synchronous From: Jeff Layton To: "Matthew Wilcox (Oracle)" , linux-fsdevel@vger.kernel.org Cc: 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 Date: Thu, 17 Sep 2020 12:49:40 -0400 In-Reply-To: <20200917151050.5363-5-willy@infradead.org> References: <20200917151050.5363-1-willy@infradead.org> <20200917151050.5363-5-willy@infradead.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-09-17 at 16:10 +0100, Matthew Wilcox (Oracle) wrote: > The ceph readpage implementation was already synchronous, so use > AOP_UPDATED_PAGE to avoid cycling the page lock. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > fs/ceph/addr.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c > index 6ea761c84494..b2bf8bf7a312 100644 > --- a/fs/ceph/addr.c > +++ b/fs/ceph/addr.c > @@ -291,10 +291,11 @@ static int ceph_do_readpage(struct file *filp, struct page *page) > static int ceph_readpage(struct file *filp, struct page *page) > { > int r = ceph_do_readpage(filp, page); > - if (r != -EINPROGRESS) > - unlock_page(page); > - else > - r = 0; > + if (r == -EINPROGRESS) > + return 0; > + if (r == 0) > + return AOP_UPDATED_PAGE; > + unlock_page(page); > return r; > } > Looks good to me. I assume you'll merge all of these as a set since the early ones are a prerequisite? Reviewed-by: Jeff Layton