Message ID | 20201016160443.18685-8-willy@infradead.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=b3Y1=DX=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7BC2C17C9 for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 16 Oct 2020 16:05:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2B736218AC for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 16 Oct 2020 16:05:07 +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="ryk51nkb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B736218AC 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 8A8CB940010; Fri, 16 Oct 2020 12:04:53 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 60F71940007; Fri, 16 Oct 2020 12:04:53 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 31EB794000A; Fri, 16 Oct 2020 12:04:53 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0058.hostedemail.com [216.40.44.58]) by kanga.kvack.org (Postfix) with ESMTP id 7662694000A for <linux-mm@kvack.org>; Fri, 16 Oct 2020 12:04:52 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 9F744824999B for <linux-mm@kvack.org>; Fri, 16 Oct 2020 16:04:50 +0000 (UTC) X-FDA: 77378261940.04.dog46_3614fb92721e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id 7CB23800BAAF for <linux-mm@kvack.org>; Fri, 16 Oct 2020 16:04:50 +0000 (UTC) X-Spam-Summary: 1,0,0,628e2164053b063a,d41d8cd98f00b204,willy@infradead.org,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1437:1515:1534:1540:1711:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3867:4321:5007:6120:6261:6653:7901:7904:10004:11026:11473:11658:11914:12297:12555:12895:12986:13069:13161:13229:13311:13357:13894:14096:14181:14384:14394:14721:21080:21451:21627:21990:30054,0,RBL:90.155.50.34:@infradead.org:.lbl8.mailshell.net-62.8.15.100 64.201.201.201;04yf1j67zjt7wd6c3633fehk46txdocy6o8ccjg7ywrteypc7zs8sa6c6dei9xo.w7huzxbqt8ccogb4o5u1z1dg7xz59ys361ykseowk6kq65wzufst96xrxkk1q76.y-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:269,LUA_SUMMARY:none X-HE-Tag: dog46_3614fb92721e X-Filterd-Recvd-Size: 2450 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf19.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Fri, 16 Oct 2020 16:04:48 +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=DjEv8CInt3MYIbFFccwff33IuqhKVtai0GAjHHJ41BQ=; b=ryk51nkbiVP/20QOSjU8LYKNch D3PuNSHHPjrUvGPushpNdbD4bliIpUDtJv+akKDXqH0Xy8GzFQ9209dtg3xKcESUSPpxQ6kdrr6/P iWjyDNAWmUiE0NLKaHJBsX8SPbR6V/4hSnXjMESHP4FZ9C+dHPLuPeT+nbrWaSmx3tmzXMyd+6K7I SeUPXtxJkcTK7Zu2dPWxhpp7sN78NkE7o1nQgfRSny2QeZXGFK31GiWqLGByf/YtzDnO5amp14uff 7eettvMERGlcEAavRUHdw1Su0huwcDEJOct5aoA4HTdYh6bQlVNMUmFKeBTatnD2+E5yeaCEuGAZA O7kiJ8Lw==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kTSDm-0004sj-Hq; Fri, 16 Oct 2020 16:04:46 +0000 From: "Matthew Wilcox (Oracle)" <willy@infradead.org> To: linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>, linux-mm@kvack.org, Jeff Layton <jlayton@kernel.org> Subject: [PATCH v3 07/18] ceph: Tell the VFS that readpage was synchronous Date: Fri, 16 Oct 2020 17:04:32 +0100 Message-Id: <20201016160443.18685-8-willy@infradead.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20201016160443.18685-1-willy@infradead.org> References: <20201016160443.18685-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: <linux-mm.kvack.org> |
Series |
Allow readpage to return a locked page
|
expand
|
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; }