[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181115142959.89ecdb6b4f24a1427062d861@linux-foundation.org>
Date: Thu, 15 Nov 2018 14:29:59 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Jan Kara <jack@...e.cz>
Cc: Pavel Tikhomirov <ptikhomirov@...tuozzo.com>,
Vasily Averin <vvs@...tuozzo.com>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Konstantin Khorenko <khorenko@...tuozzo.com>,
Johannes Weiner <hannes@...xchg.org>,
Mel Gorman <mgorman@...hsingularity.net>,
Matthew Wilcox <willy@...radead.org>,
Andi Kleen <ak@...ux.intel.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: cleancache: fix corruption on missed inode
invalidation
On Mon, 12 Nov 2018 12:31:53 +0100 Jan Kara <jack@...e.cz> wrote:
> > mm/truncate.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
>
> The patch looks good but can you add a short comment before the
> truncate_inode_pages() call explaining why it needs to be called always?
> Something like:
>
> /*
> * Cleancache needs notification even if there are no pages or
> * shadow entries...
> */
--- a/mm/truncate.c~mm-cleancache-fix-corruption-on-missed-inode-invalidation-fix
+++ a/mm/truncate.c
@@ -519,6 +519,10 @@ void truncate_inode_pages_final(struct a
xa_unlock_irq(&mapping->i_pages);
}
+ /*
+ * Cleancache needs notification even if there are no pages or shadow
+ * entries.
+ */
truncate_inode_pages(mapping, 0);
}
EXPORT_SYMBOL(truncate_inode_pages_final);
_
Powered by blists - more mailing lists