[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.11.1904091133570.1898@eggly.anvils>
Date: Tue, 9 Apr 2019 11:43:30 -0700 (PDT)
From: Hugh Dickins <hughd@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
cc: Hugh Dickins <hughd@...gle.com>,
"Alex Xu (Hello71)" <alex_y_xu@...oo.ca>,
Vineeth Pillai <vpillai@...italocean.com>,
Kelley Nielsen <kelleynnn@...il.com>,
Rik van Riel <riel@...riel.com>,
Huang Ying <ying.huang@...el.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 4/4] mm: swapoff: shmem_unuse() stop eviction without
igrab()
On Tue, 9 Apr 2019, Konstantin Khlebnikov wrote:
> On 08.04.2019 23:01, Hugh Dickins wrote:
> > - if (!list_empty(&info->swaplist)) {
> > + while (!list_empty(&info->swaplist)) {
> > + /* Wait while shmem_unuse() is scanning this inode...
> > */
> > + wait_var_event(&info->stop_eviction,
> > + !atomic_read(&info->stop_eviction));
> > mutex_lock(&shmem_swaplist_mutex);
> > list_del_init(&info->swaplist);
>
> Obviously, line above should be deleted.
Definitely. Worryingly stupid. I guess I left it behind while translating
from an earlier tree. Many thanks for catching that in time, Konstantin.
I've rechecked the rest of this patch, and the others, and didn't find
anything else as stupid.
Andrew, please add this fixup for folding in - thanks:
[PATCH] mm: swapoff: shmem_unuse() stop eviction without igrab() fix
Fix my stupidity, thankfully caught by Konstantin.
Signed-off-by: Hugh Dickins <hughd@...gle.com>
---
Fix to fold into mm-swapoff-shmem_unuse-stop-eviction-without-igrab.patch
mm/shmem.c | 1 -
1 file changed, 1 deletion(-)
--- patch4/mm/shmem.c 2019-04-07 19:18:43.248639711 -0700
+++ patch5/mm/shmem.c 2019-04-09 11:24:32.745337734 -0700
@@ -1086,7 +1086,6 @@ static void shmem_evict_inode(struct ino
wait_var_event(&info->stop_eviction,
!atomic_read(&info->stop_eviction));
mutex_lock(&shmem_swaplist_mutex);
- list_del_init(&info->swaplist);
/* ...but beware of the race if we peeked too early */
if (!atomic_read(&info->stop_eviction))
list_del_init(&info->swaplist);
Powered by blists - more mailing lists