Message ID | 20181112120003.23245-1-ptikhomirov@virtuozzo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0FFFE14BD for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 12 Nov 2018 12:00:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE27D29D5B for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 12 Nov 2018 12:00:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1B2A29E9B; Mon, 12 Nov 2018 12:00:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CD7229D5B for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 12 Nov 2018 12:00:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 592B16B027E; Mon, 12 Nov 2018 07:00:14 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 517B16B027F; Mon, 12 Nov 2018 07:00:14 -0500 (EST) 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 4070C6B0280; Mon, 12 Nov 2018 07:00:14 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by kanga.kvack.org (Postfix) with ESMTP id C7B396B027E for <linux-mm@kvack.org>; Mon, 12 Nov 2018 07:00:13 -0500 (EST) Received: by mail-lj1-f197.google.com with SMTP id e8-v6so2646870ljg.22 for <linux-mm@kvack.org>; Mon, 12 Nov 2018 04:00:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=lPgQrY/hEr6EnH4YxP1qV6ve7x1RyTlRzCugdoO0NYY=; b=JzGuQq1QXGYBJfnowI8rAr3wqc2hLExFxIeXdxo8yLa6l+CSCuXPf7wmpI7Li+w0F4 dlIIG8xOIlttAD5pFUOg2XcyInhp6300HSvhyJGO2vwutDn1NbVQhh5l0hP1zlu908JG HT3vbthJAAZoUNJdT+M5imWmQCfUrrTV7b05QdumdAL5JD6OuLePm7gAcBzOkkkcjOEY 1HPsgyljr0obEyYwd5+dbqXpvh/Wx9eoPWeR3dWL4v45B9/sHNEBMTsstThBW7uZ9y5W iXFdliYQcrKfQPr2USwEmDq4vvAy6zwAg+HE/BsQPFUNFpcYpGy6nWmjV37D/BRzhLyB YHfw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of ptikhomirov@virtuozzo.com designates 185.231.240.75 as permitted sender) smtp.mailfrom=ptikhomirov@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com X-Gm-Message-State: AGRZ1gJb/EUcVoKoyCsCj848IczFG5pA8hwveh1TdlvxI7S513oMJ3Kw NqP56b2ngatOyUb4RboRWxaCXH9/l8PlX/V+6kv3tHXKeh7BatfiPL1YDlmj2dkqImDnKDXKU5o PWmQIDBPk9sB1K4GoIGgxy88I5i5I2UGWKRrszFne+wYCwDauLEIKpNYyUZtXIXkfQA== X-Received: by 2002:a2e:1603:: with SMTP id w3-v6mr485171ljd.33.1542024013209; Mon, 12 Nov 2018 04:00:13 -0800 (PST) X-Google-Smtp-Source: AJdET5drVaM5X/N/jKrb1JGytnAcKDKosx1UQtgvH2DMhwLaXy6FPttUWOcO32r3u4/OtCMLDhYx X-Received: by 2002:a2e:1603:: with SMTP id w3-v6mr485127ljd.33.1542024012231; Mon, 12 Nov 2018 04:00:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542024012; cv=none; d=google.com; s=arc-20160816; b=q3F976dj/ePUk0TeMHPI+X0KqGa7E499pCSwAjVW3iTciyYJEdN3569S+iZN08rq5L qQ6SpJzCa/USwnBBueYTCeheb81yJdSKt4GStYFwZmL174Gchbf15qdp8kjwbXsuwlmI 8/UAffA4iKhzRMcwKTA5n3hF0E1fzUa/G0KxYZ6Z8lGDoWo7dnFRAr+v/Mp3erSxVacj g+Tyo+v0NP8dZkAQhUHSzuK5vdL1XZ0Q4Z/rdebXtpkpnVdUIyESW6Hea8JUXZ4Jw18s 9gLeIV92RY+vNHXNoZ3SB8Uf4JevWKHoxUdsFF1OQkRRpE8tyOCeIuc1xLpmv5tLzjll e8wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=lPgQrY/hEr6EnH4YxP1qV6ve7x1RyTlRzCugdoO0NYY=; b=rbb3j4UOAqidR4tf3/P/aJhrVWyE4Wz5Y2cmMh94DgHLMCk8H1d0dc1mwnWoUF5Sho MlVzvYC+z0ofQz9cIby0+2d4Y2EsP8jcrLykK2Kw7Ru373IWdernYRqWaKxCNztvbfmp /ycOQakE4ch/vN37GpRkx9Wroq0q5f7SRwdOOF3kWrlz5iwjojGVaJ99PS0qnMIbPyFp LVDBbAxFVEjKx+8DDmJEMr2pqmwwSemUZD4Tchss/YYh/leFnosjnPQMyJv6VqxP0LsY 5SJfJ3x8ZIpZUb2nacRJU15pvJTYKZp4Ld0wNVpMJUKiMWqB+IW5ITjmr3CeZsPDUs9T mjgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ptikhomirov@virtuozzo.com designates 185.231.240.75 as permitted sender) smtp.mailfrom=ptikhomirov@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from relay.sw.ru (relay.sw.ru. [185.231.240.75]) by mx.google.com with ESMTPS id q5-v6si16548373lji.207.2018.11.12.04.00.11 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 04:00:12 -0800 (PST) Received-SPF: pass (google.com: domain of ptikhomirov@virtuozzo.com designates 185.231.240.75 as permitted sender) client-ip=185.231.240.75; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ptikhomirov@virtuozzo.com designates 185.231.240.75 as permitted sender) smtp.mailfrom=ptikhomirov@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from [172.16.24.163] (helo=snorch.sw.ru) by relay.sw.ru with esmtp (Exim 4.90_1) (envelope-from <ptikhomirov@virtuozzo.com>) id 1gMAsv-0006JV-RC; Mon, 12 Nov 2018 15:00:05 +0300 From: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> To: Jan Kara <jack@suse.cz> Cc: Vasily Averin <vvs@virtuozzo.com>, Andrey Ryabinin <aryabinin@virtuozzo.com>, Konstantin Khorenko <khorenko@virtuozzo.com>, Pavel Tikhomirov <ptikhomirov@virtuozzo.com>, Johannes Weiner <hannes@cmpxchg.org>, Mel Gorman <mgorman@techsingularity.net>, Matthew Wilcox <willy@infradead.org>, Andi Kleen <ak@linux.intel.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] mm: cleancache: fix corruption on missed inode invalidation Date: Mon, 12 Nov 2018 15:00:03 +0300 Message-Id: <20181112120003.23245-1-ptikhomirov@virtuozzo.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181112113153.GC7175@quack2.suse.cz> References: <20181112113153.GC7175@quack2.suse.cz> 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> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
[v2] mm: cleancache: fix corruption on missed inode invalidation
|
expand
|
diff --git a/mm/truncate.c b/mm/truncate.c index 45d68e90b703..2c5285767ce5 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -517,9 +517,14 @@ void truncate_inode_pages_final(struct address_space *mapping) */ xa_lock_irq(&mapping->i_pages); xa_unlock_irq(&mapping->i_pages); - - truncate_inode_pages(mapping, 0); } + + /* + * Cleancache needs notification even if there are no pages or shadow + * entries, else we will leave leftover pages in the cleancache for + * a deleted inode. + */ + truncate_inode_pages(mapping, 0); } EXPORT_SYMBOL(truncate_inode_pages_final);