Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2298713rdd; Fri, 12 Jan 2024 05:40:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKDkOID8zEt04po3wu6v+mgkuqUYBeKQ0zHA0XuY+zm7nRW9wUHWJt4jCWdmCCZd15unNF X-Received: by 2002:a17:906:7b54:b0:a2b:1df5:521b with SMTP id n20-20020a1709067b5400b00a2b1df5521bmr582175ejo.123.1705066839992; Fri, 12 Jan 2024 05:40:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705066839; cv=none; d=google.com; s=arc-20160816; b=zOT15yAYltkG5NdY5FJoay0J90EvqCQmRukG/xc0KglHIF86ed0JZ0emjbvLaMOVHm 62Ftwnf0ebiGbEUVFIZqYSLIipbOcCgqrQTA9r4+Pj8uHpGTe9x0USw+W7S3o9XLYy3Q 9v5A2qvfbMM0MIhVrUckWg/gpYm7+qRbolmS2RlXCW5+S95f+Vz7oXxF4Td3L9nBqqkB gmPs1xZHJ9t7K7rGSyR4+0pfoxUkHzpB4e7S75DEl/bPKqpiQID1dBpaqLYSJKh0zolV iyakugTKYFRDquHD7cKkrs5WnmDUJTuH7A3rQMHi9/tcQE3Dea5qkRaMXv0aZNuDSHte BSbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=Xyftl209I+idHeNgme2Cd/PERc7mSFLezFL3M2Gwjgk=; fh=+1gRqa5f95hPJjPakHoOBIzWV/hIwZCjviqbo6DEr38=; b=FY537emKRT8UTR880lc5tUnjQct+uH0aC9kIWsIp8vSOxq0LLuombmc9BkieUP/43A 14iQhwdWelAKvX+UTfBhGZUcqzZoaGIdN9pNHgewYiEnXyOVYHCzOwTF3DvAu+xoiYMw qqkKqihouWICHAJ85KcaPUS31bSI+mIL7m3mD7wiAu9hx44NjNXj+GFSKjub5iKZZqis /RzXFJtDRK+k7uazxXc+f2fWtZOX/W/90HZR1d75v1uWkPXEL0qYfvzc3rAVGqMU03Q9 pmizg3JeURoRBi/WQ+RwfGqzqA97oqRFZX9KNt5SH9daEl3CfNk08TG7jtDHx1O06Bg/ RKXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-24695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24695-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y14-20020a170906470e00b00a28bb1abe4csi1338919ejq.703.2024.01.12.05.40.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 05:40:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-24695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24695-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B96191F2591E for ; Fri, 12 Jan 2024 13:40:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F1166D1B3; Fri, 12 Jan 2024 13:40:28 +0000 (UTC) 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: linux-kernel@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.