Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2306349imu; Fri, 23 Nov 2018 07:22:17 -0800 (PST) X-Google-Smtp-Source: AFSGD/VRDKreAUgEzM0fHyChucAeUpV0Lj3hwS9fhuNkQKPp9AUvkI9CpJW0xowXFlwGLyAQkjDx X-Received: by 2002:a63:680a:: with SMTP id d10mr14653784pgc.396.1542986537190; Fri, 23 Nov 2018 07:22:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542986537; cv=none; d=google.com; s=arc-20160816; b=mtJ8xTBGM14P8XCFYIzcLau4DSdf7uOFQALMVpCcGgmFp1n95ji9295qwLwvJmzk82 W6vvhJrNUG/0/utGdH0K/bn5q6+yuiBwnTDU73vRX1U5h8CdvkadBEkaaMncGcakoVXz tcUBlzhAcYp6TyTvw3uXyIfmKZN7bh8gNp+dmg2wbUi5lyI+52pmIk0VAKwaATEyaHFz qIANOSqLcsn2viYc0QXFzonDbh2EJv6iDjOhSQqGXVyL89hDyXzLWanPKznRT7iUYLrp XY2K/5q6w192SKdmFHoQo9ySaXbuLk/zQQFAIYcqwhPOfRMX0Y3HWGqn6lYl8PyP/eNp vPBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SkE2ZgUVLqvJQM4/HJjtVxp41plF88J2zZvd/vyI4IM=; b=LHJouPDPRHWIJfbOTzUzPr5FIEruXq4Qne1I7qt6304197q1iH365LGpqBqCa0iTsm dKz06XmYB4uV5Y1dXq1SciJAqsP895kqgdjaa6MyTiGOwE06aYhjzgnd6JnVUVYiZ6bY GZbmRrzQGRskE/Xxui/m7+aOGdbj7CbNrhCSuE8i1p/Sx8vj5aDYNPcecxYPYKw3pkD1 ge9qKxKQqxvzq/1jWIhas8qtzQnzsAJCchdflQidmkHdCxXd0lUItRusKuAfgjadheoK xGWOQyTY0Zxo4W7rvTPeL8kl9E2xH8xJgnffsR/24nHFwr8SodaR+WRrL7UrJmS+mm13 Lb3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TyU0OiWr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v75si18025461pfd.157.2018.11.23.07.21.51; Fri, 23 Nov 2018 07:22:17 -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; dkim=pass header.i=@kernel.org header.s=default header.b=TyU0OiWr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395011AbeKVWl3 (ORCPT + 99 others); Thu, 22 Nov 2018 17:41:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:36752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730337AbeKVWl2 (ORCPT ); Thu, 22 Nov 2018 17:41:28 -0500 Received: from localhost (c-98-234-55-98.hsd1.ca.comcast.net [98.234.55.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D3FC120663; Thu, 22 Nov 2018 12:02:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542888142; bh=KEEg98zg7fXg5ipC3MeUwLq+yxyuV4swZXUwoMZ+BJ0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TyU0OiWrYGo8bO0Fxj2Y6VqUxWGZjZsf22NMp7D4yLAKThfAXwmVRBaXx4GzZI79j ySOMF18rnwVjPVFWFeWrADRc2x7KM+Gz5DdLPO/wbHJuIVdxV7d39cv+q22hn1F13b V9jMwv51+95U/ShaRYmWldgWH5MQJNUDnIoTVsXI= Date: Thu, 22 Nov 2018 04:02:22 -0800 From: Jaegeuk Kim To: Chao Yu Cc: Pan Bian , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] f2fs: read page index before freeing Message-ID: <20181122120222.GA52295@jaegeuk-macbookpro.roam.corp.google.com> References: <1542884326-74903-1-git-send-email-bianpan2016@163.com> <2cd91c95-598d-fcc1-b1d6-6fddb224efcf@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2cd91c95-598d-fcc1-b1d6-6fddb224efcf@huawei.com> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/22, Chao Yu wrote: > 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! +1 > > 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 Done. > > Thanks,