Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp670865pxk; Thu, 17 Sep 2020 12:57:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8w7bpjvWKKiEYieYd75htX3AZV5i/kjWx7Oh3hA9mz8hzhIwmxWA0OJQ5MJK/hzi9Iyx0 X-Received: by 2002:a17:907:2115:: with SMTP id qn21mr31889050ejb.278.1600372621291; Thu, 17 Sep 2020 12:57:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600372621; cv=none; d=google.com; s=arc-20160816; b=TLU/ljGCzucuH7y2LfTdSWqBeOPN57hS8cE76v1LOq2k1Cvqf06ymm3QadzY0VMUtV WZmg78mOm8wfth8ceAEwthP51NnYYM9hWlsEGT6ubSyKIFqa5KCN8nCFvMleuemSEUAE 3VhqMJO2ptfR5FqgJMz4TEd3VQfBEXTXQJBgBj8v7a7lXtj8qL4+TWGGTai/sw4iZK+x K5PbiLzLFNU7rhn7zkWgypjEEhW2s/lvITN9z9sJDXFDXseoJQ/Wr6ryYxgdPJUBvgYJ jTu1FGisAQ6jMK53Q4kl8bLsF1vjO0OZOyk+N2Ww1LyxzQHny2CWfyftG4wHvaIdRoOM k8aw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=U62SUaGW7wvOzK2xtP2u7DsjwRF7PHeB8dtYgkbpx0Q=; b=qaN2bK6GQMr3T63YtP671hcd5sLvRLFYzKcNbWsojAqNGZAoy/i3RSCo87vgFUft7V GiHOl7reJ5+esGQiI/N1h5+KuB9ne0MfeFVq6qH3EFAkPBJnzVHstuVUDiMWu8HuGFvy 2ECcloPMjTfbQWu9NXgCRVFGLLMlLMHcS6JAp6u/BTrttP8clarPTzCEhYJjGCgoWScM GAYbPjy1HPEoSgL+0LoUVbWcbzAbffoubfm00ks6e9wI6wpMV2gZayKAWGHqKCITMDDj sr+tN2Ys5OzU+WAPeTQ0JryhzYrKwJO8TYtGvUswXQMiMmIIISv9+5AEyrDlz8KUw99J XWxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=a+K4f9p4; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q4si650447ejd.380.2020.09.17.12.56.37; Thu, 17 Sep 2020 12:57:01 -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=@infradead.org header.s=casper.20170209 header.b=a+K4f9p4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727930AbgIQPMP (ORCPT + 99 others); Thu, 17 Sep 2020 11:12:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727632AbgIQPL0 (ORCPT ); Thu, 17 Sep 2020 11:11:26 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20969C061797; Thu, 17 Sep 2020 08:10:55 -0700 (PDT) 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=U62SUaGW7wvOzK2xtP2u7DsjwRF7PHeB8dtYgkbpx0Q=; b=a+K4f9p4caAQHaSAXoyEo9jeic z4rS6gVD2VceD3F5n0ghyfOLqAZbHLTwI99dJ+d8FGfT/jTf1vAo5dvv+QCapDyOhKA8JoU0dH7RD jl4ADHoGw3ZLskEsKuxMRE7ZcodmNtgjg/vR+S4wH8kUjdMw/iyvasBdyOEf/DOf/LzNvzfPhKY4c BDymXvXRBCnHXXX5DABtfF6xsFxkpO+KbwOq51fiobz400r64lHL5BJ2mnOPZvZ0GtPVfUU+QiaEX Qoc6ZzECgmEic+oThwXQSXLyd+mCy7ExsKIh2V7a4Z93AiINBSZZYIOO3eL3fpc8kC69q1XZ+87IC 7NyQ+p5Q==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIvYj-0001Pp-Cs; Thu, 17 Sep 2020 15:10:53 +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 Subject: [PATCH 06/13] cramfs: Tell the VFS that readpage was synchronous Date: Thu, 17 Sep 2020 16:10:43 +0100 Message-Id: <20200917151050.5363-7-willy@infradead.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200917151050.5363-1-willy@infradead.org> References: <20200917151050.5363-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The cramfs readpage implementation was already synchronous, so use AOP_UPDATED_PAGE to avoid cycling the page lock. Signed-off-by: Matthew Wilcox (Oracle) --- fs/cramfs/inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index 912308600d39..7a642146c074 100644 --- a/fs/cramfs/inode.c +++ b/fs/cramfs/inode.c @@ -916,15 +916,14 @@ static int cramfs_readpage(struct file *file, struct page *page) flush_dcache_page(page); kunmap(page); SetPageUptodate(page); - unlock_page(page); - return 0; + return AOP_UPDATED_PAGE; err: kunmap(page); ClearPageUptodate(page); SetPageError(page); unlock_page(page); - return 0; + return -EIO; } static const struct address_space_operations cramfs_aops = { -- 2.28.0