Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2078208imu; Fri, 23 Nov 2018 04:24:03 -0800 (PST) X-Google-Smtp-Source: AFSGD/UVZRJlC8CfwOWHEfK+lx8AUP3POWtC6NmmO73wqZJlNAl7b8y/XcKdfdxXSYhzTNq4znvx X-Received: by 2002:a65:60c2:: with SMTP id r2mr11006273pgv.393.1542975843511; Fri, 23 Nov 2018 04:24:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542975843; cv=none; d=google.com; s=arc-20160816; b=gZKxeG0ifpMWUlOytY1PLl3WvGistvqWqXXFjiRI+vva4hIQ8Lnld3jlKLhQ28z9SQ m06dYIjSyyTFIU19ifyEVJTc42QKGWPcHlgvF//Fu4jOlADB1F3pef6Nk1xt8nYXoklY ycpMkqnHEPr/HrbX9wopXirs71UE1x2Wy6VXogXwCCEo4KYCVIcOEsBHYuMw7DHpG/aq yAxxawNSsJQcTOutYcVbGr8MOcTSnxlWkPKhC0nWPt5Mzmn3x+bsZnxWYydQcKzpIu4n 1y4V0pUYVdTAp1bAZnwS8EBPk12PQ4vzkWG89oW+wocZlWoIsuNBQuDUH18QlU8oRXeV p0/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=I2dfB4mQoDwN/XsjK353NZvtQKlP7uxLt+Qa284vJfk=; b=D47ctUQoKh2fMuE9p1ZssvkS6TXF8YvM/9jH9fBtj7yhG0njYkMocpstVNb1iU039y /z4mH8NLdfjZUCgXW/jd0Lzm1uSW8UBXirGbLKFifBKFVJowxOD9HYYBJ2w4qQIPLSgf wo6vFAHhBz20plrRqK+jCecHsjl6ChwIGa7lJxeTuiChQ8U2uqHjB1yEnx75gZ40ax/J u7AUgM3fubo+xvPk/cdDLDjn73PAZJUXsRieBcMKcrlS4BVYeSxgfZvT0ct5iUErfJOi rvOmP5Kp5hMsz3xa08nFlvtMSURc1D+Hsfg7fgfb1/5prrT7nzaBDUMzQDSCsK1URnQs yGuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2si14766727pgp.546.2018.11.23.04.23.49; Fri, 23 Nov 2018 04:24:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390667AbeKVWAQ (ORCPT + 99 others); Thu, 22 Nov 2018 17:00:16 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:56443 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387962AbeKVWAQ (ORCPT ); Thu, 22 Nov 2018 17:00:16 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 591FFEF1A4E21; Thu, 22 Nov 2018 19:21:17 +0800 (CST) Received: from [127.0.0.1] (10.134.22.195) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.408.0; Thu, 22 Nov 2018 19:21:17 +0800 Subject: Re: [PATCH] f2fs: read page index before freeing To: Pan Bian , Jaegeuk Kim CC: , References: <1542884326-74903-1-git-send-email-bianpan2016@163.com> From: Chao Yu Message-ID: <2cd91c95-598d-fcc1-b1d6-6fddb224efcf@huawei.com> Date: Thu, 22 Nov 2018 19:21:16 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1542884326-74903-1-git-send-email-bianpan2016@163.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pan, On 2018/11/22 18:58, Pan Bian wrote: > The function truncate_node frees the page with f2fs_put_page. However, > the page index is read after that. So, the patch reads the index before > freeing the page. Good catch! It will be better to add: Fixes: bf39c00a9a7f ("f2fs: drop obsolete node page when it is truncated") Cc: > > Signed-off-by: Pan Bian Reviewed-by: Chao Yu Thanks,