From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx01.omp.ru (mx01.omp.ru [90.154.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A981B25746; Fri, 12 Jan 2024 13:40:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=omp.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=omp.ru Received: from msexch01.omp.ru (10.188.4.12) by msexch01.omp.ru (10.188.4.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1258.12; Fri, 12 Jan 2024 16:40:17 +0300 Received: from msexch01.omp.ru ([fe80::4020:d881:621a:6b6b]) by msexch01.omp.ru ([fe80::4020:d881:621a:6b6b%5]) with mapi id 15.02.1258.012; Fri, 12 Jan 2024 16:40:17 +0300 From: Roman Smirnov To: Matthew Wilcox CC: "stable@vger.kernel.org" , Greg Kroah-Hartman , Andrew Morton , Alexey Khoroshilov , Sergey Shtylyov , Karina Yankevich , "lvc-project@linuxtesting.org" , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH 5.10 0/2] mm/truncate: fix issue in ext4_set_page_dirty() Thread-Topic: [PATCH 5.10 0/2] mm/truncate: fix issue in ext4_set_page_dirty() Thread-Index: AQHaRJvZs/ufXYdw80SbjgapkLNiNLDUiucAgAGlSY4= Date: Fri, 12 Jan 2024 13:40:17 +0000 Message-ID: <3cd52f6e1b3d4daba35fb350e990e646@omp.ru> References: <20240111143747.4418-1-r.smirnov@omp.ru>, In-Reply-To: Accept-Language: ru-RU, en-US Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-kse-serverinfo: msexch01.omp.ru, 9 x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: Clean, bases: 1/12/2024 9:53:00 AM x-kse-attachment-filter-triggered-rules: Clean x-kse-attachment-filter-triggered-filters: Clean x-kse-bulkmessagesfiltering-scan-result: InTheLimit Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 11 Jan 2024 15:31:12 +0000, Matthew Wilcox wrote: > I do not understand the crash, and I do not understand why this patch > would fix it. Can you explain either? The WARNING appears in the following location: https://elixir.bootlin.com/linux/v5.10.205/source/fs/ext4/inode.c#L3693 Reverse bisection pointed at the 2nd patch as a fix, but after=20 backporting this patch to 5.10 branch I still hit the WARNING. I noticed that there was some missing code compared to the original patch: if (folio_has_private(folio) && !filemap_release_folio(folio, 0)) return 0; Then I found a patch with this code before using folio, applied it, and tests showed the WARNING disappeared. I also used the linux test project to make sure nothing was broken. I'll try to dig a little deeper and explain the crash. Thanks for the reply.