Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10788215imu; Thu, 6 Dec 2018 06:50:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/WTmZH/vVYZ9wlTrf0wnjRdQUvJ9wKqSkYCng8bXFu+uvaIESMAh6wspqz/d1jjEM5egwjd X-Received: by 2002:a63:2b01:: with SMTP id r1mr24032807pgr.432.1544107844963; Thu, 06 Dec 2018 06:50:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544107844; cv=none; d=google.com; s=arc-20160816; b=IxchVzHXdC6VfRZhuM0R5fcsg//hOvAt16TSb7WADT/SJEU4TazFyhLtMPY/ZnBzxb vi6i0igEOTEvp14wYl8kje2aVKgdqdigsihfRODg+AdbRvhux4I0GDgLv810izRGqMbc D2vzGB9S0sAfgUUtJlLGWivcQQNmPzOKZ7n/t7Q6kW3o1lwKBgHQXTtnDKfmALqpd5yW arCUqNKK5wLnVBOpehqZtNm/8OewkaQQ+52wWNWjC/vkGom9tWT4Gjw67MASxtK8uNt2 Rix5KIJLBeyhdKsyE9OgTWrCAtmlDYQk0wfaQg8k/1pfOx8RliRvzRbKnOdfvI7KdlGF Imcg== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mx+o4uztpB7VbOZ0W3Uh3ESIyX5v5OC5SVg4gJC9xy4=; b=HDkq2RoE56YS01/AwX4N5yZfA3+9wKoUtXNyty1Fe0cucFbFiyp2tydEMbyHChZoQf U22TRnHV6081wSGbLzAGnYj/sPCE+t9PpNCw71lXeX9c+236YCS26SbCCwK111HtRZM3 OfE8r74eKuw2mwoXqUhnXDwIW4ymJnx97TVUQnVFiapGfzTOQsPXCicwA2iNuPi6VwWm q2t2ODeGyUBpQKTVNFTrpLZzJW5fwq96a+i9BOMBaFLxCBYT8s2gTGjBeI7eswKEN7Rn L/OZAInfuNLcq5uMPhcb9+dtxxD9ZMRzz7h8e+8iX/1fyAxhTQp7orxLr8mmMBtI9FRF p27Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0nBCkbPG; 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 j91si412848pld.395.2018.12.06.06.50.29; Thu, 06 Dec 2018 06:50:44 -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=0nBCkbPG; 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 S1731067AbeLFOsC (ORCPT + 99 others); Thu, 6 Dec 2018 09:48:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:53118 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730774AbeLFOr7 (ORCPT ); Thu, 6 Dec 2018 09:47:59 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 889B22082B; Thu, 6 Dec 2018 14:47:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544107679; bh=uj41PPN0C8iNBqG2AdXb/gcKO7OlzYS7H/bqgRhy87Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0nBCkbPGrl64mjPsfhb4fwq1c+XM2KyZbQQluCuPEoBpLb8EDpgcNevKN3RlxvxWK eJT5klo+DamPrTY+b1uM4aZNwpusF9HMxlD73uAG9T7MkAHfBOOuW5qFZOeGvseu+E q2ehBu7M/vQpwYwiYyPy5prERmCs3Vb17Xjb1Urg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chao Yu , Jaegeuk Kim , Ben Hutchings Subject: [PATCH 4.9 097/101] f2fs: fix missing up_read Date: Thu, 6 Dec 2018 15:39:36 +0100 Message-Id: <20181206143018.764350495@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181206143011.174892052@linuxfoundation.org> References: <20181206143011.174892052@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jaegeuk Kim commit 89d13c38501df730cbb2e02c4499da1b5187119d upstream. This patch fixes missing up_read call. Fixes: c9b60788fc76 ("f2fs: fix to do sanity check with block address in main area") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- fs/f2fs/node.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1606,8 +1606,10 @@ static int f2fs_write_node_page(struct p } if (__is_valid_data_blkaddr(ni.blk_addr) && - !f2fs_is_valid_blkaddr(sbi, ni.blk_addr, DATA_GENERIC)) + !f2fs_is_valid_blkaddr(sbi, ni.blk_addr, DATA_GENERIC)) { + up_read(&sbi->node_write); goto redirty_out; + } set_page_writeback(page); fio.old_blkaddr = ni.blk_addr;