Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1160728imm; Wed, 1 Aug 2018 11:11:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdE7XsaDj/NQDH7jrbj4zAhuwUNEpQjU5BqwRxORmlHevUlZmJg+D6dNs2IdAOc7B1wPwzO X-Received: by 2002:a62:9f1d:: with SMTP id g29-v6mr27422896pfe.207.1533147066894; Wed, 01 Aug 2018 11:11:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533147066; cv=none; d=google.com; s=arc-20160816; b=MyV7qg41VKxLxTdBaS9fh2boEmsx8Gr3h2nX7VzKJ5Y17siDb9w2JNobOh8GJhUiYA FVvXAW/iyK9tDRl6DBg2GSm4nosF7yRigDBbNEh6wnofWam3ovJxYpi1yrwlvEXIvUQQ ek+973RvDuI9y2ePl9jIognG+K/r5uZL51Cp5OAX0E3gfjEytPbMEKreP7WfllkiTa6p KxlXeAK1+dESQ+aBRc/Rdh4MhzWRFGYZ6ih1k+qhaXs1kqs79TPBM4IO+cEb7DvARcmT edJ4LZ/6MUwy9cqE+4xxiRIjM8EmlzsaC0e2DQv1qfqEc0flXeFSRlDpK34VXtktFp9L CxxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=sRRE5zWCyNY5c4uOnD7iONkRI/wo88gQztJ/oDZPWZ0=; b=TpT5Wsx2uB3LwXXrogylMMDTNY7B17WYA/yMxtvn2J/H7JdCYbiPJ5CmWAK4Mc+bC0 BCzlNyq9MmlhOlefJDIqYhzFgsHDscginpW/AVpHSp3j3ZBjJr+TQgCZDj9sAGRmqShJ L90lOx1sBKbWt6mVm42GDU6OI4tXErKOvjwbr3PwrzfGz5HQZk3l2NFtFDxBr8fux595 eWrgmdxyBB7Nt+KQc/nKRZCMSne5MKzQgtxxRgBRwayPjtP2IlWOlWFgDnbsIeioS3M5 +17Rm3LUKODQbc1RQ/3P7ht9RyB2BoL+7S+UQzOCqakeayzif6OUd2Ux6CAEXUCllnpv RCkA== 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 b22-v6si6034983pls.127.2018.08.01.11.10.52; Wed, 01 Aug 2018 11:11:06 -0700 (PDT) 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 S1731902AbeHAT41 (ORCPT + 99 others); Wed, 1 Aug 2018 15:56:27 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49924 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405754AbeHATIg (ORCPT ); Wed, 1 Aug 2018 15:08:36 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6F77B13A0; Wed, 1 Aug 2018 17:14:47 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chao Yu , Jaegeuk Kim , Sasha Levin Subject: [PATCH 4.14 058/246] f2fs: fix to wait page writeback during revoking atomic write Date: Wed, 1 Aug 2018 18:49:28 +0200 Message-Id: <20180801165014.489760322@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chao Yu [ Upstream commit e5e5732d8120654159254c16834bc8663d8be124 ] After revoking atomic write, related LBA can be reused by others, so we need to wait page writeback before reusing the LBA, in order to avoid interference between old atomic written in-flight IO and new IO. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -225,6 +225,8 @@ static int __revoke_inmem_pages(struct i lock_page(page); + f2fs_wait_on_page_writeback(page, DATA, true); + if (recover) { struct dnode_of_data dn; struct node_info ni;