Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3479301imu; Sun, 11 Nov 2018 16:03:05 -0800 (PST) X-Google-Smtp-Source: AJdET5cUn68kMSeUKBhSYKeUiJATeA0x9D3MR5e5+/GiQcMsH/wCKFigNOrTgg5bazMgXqcfbq39 X-Received: by 2002:a63:224f:: with SMTP id t15mr15403035pgm.69.1541980985745; Sun, 11 Nov 2018 16:03:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541980985; cv=none; d=google.com; s=arc-20160816; b=LZt+c1AC/xQXkQ3Ab1mwP92KIocSMuIJQIlqflPMoJdSo1O11FevhN2c/YalZk6IrO 1qqmuzQDnQ0prXQEgRQwjM2ZC57R2c4riYDqqMKaYrm8C6lxFyKRqEnveig3/2Cb62gy g/3O4VOmkXwvj50zZRPCyYK5kRDN9923aM856fQvnMLyH3dfLtNMqqJ5Y0PzRj67nKTT U+7CnmK3Yg+/X7dweYAG50BkXpANh6yAj5c/9IBCfxxvHqA8WoWSsGH90B9KjBcDWsIp pFqDobG9aS/1fWFNcl9xz52FG28DQSHvEpokkJHKnfB+m4oaJx7yak5DoW0LfH+k7w8Y hrmQ== 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=1dJ4f+aFitCL3bkjldixQraxnrQntpuKb4EWUdjYpmU=; b=ifL9KWF2uqVfVbXthnE/4ZpD/wZlKNLyQmmaVcW3mg2S72eOJXHWsgJGdXM4rS3SRJ IQ5Gz58Njk6uQaMWjdEt5jte/3w+UYLw+Xsndjld18YashMAs8y/ojy6pVonE/VfHhml JqNyM6JuINVQuZ4VBuT5gA9NKGVNcmIVptUvN8EKfC/g87ZIuW2MMMbkWsswpbZCUSDS CgP++kb3dwBIDISPeOYSUNjF4tNbmCJZ41AogQqrazCuFOyhGuVUSpEm6w1Lgz7lgp+o aMkJWBHCboiq/UiOXtP95UjX8WKBhKNm9BWx2IZPLSakRKs9Ozd8c8aSF90XRDIRwqTf 160g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PPzd+FeN; 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 d82-v6si17043735pfe.190.2018.11.11.16.02.50; Sun, 11 Nov 2018 16:03:05 -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=PPzd+FeN; 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 S1732171AbeKLIRy (ORCPT + 99 others); Mon, 12 Nov 2018 03:17:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:34236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732159AbeKLIRx (ORCPT ); Mon, 12 Nov 2018 03:17:53 -0500 Received: from localhost (unknown [206.108.79.134]) (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 741ED21582; Sun, 11 Nov 2018 22:27:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975278; bh=9aFlQKOJfwyxwvES6+vftQY8h/W4E6w9NRt6CUlIw2o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PPzd+FeN5VyJ9k+v4LIULZIuzX6F6vd1ajBCLtYeXFMFH0EVz12yR7HmwTCYpMuEu krfRNZu4vAVrN3MtO4mmuVVJNc9K5GQT4NdhVVUz3c8d7mMXIuqX4pJLI/tMONLnfu kUMI0O1iPDG1SjDa4zBhAeoSDhUsEP+1uZ36kp0o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chao Yu , Jaegeuk Kim Subject: [PATCH 4.19 193/361] f2fs: fix missing up_read Date: Sun, 11 Nov 2018 14:19:00 -0800 Message-Id: <20181111221647.547379227@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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.19-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") Cc: # 4.19+ Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim 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 @@ -1542,8 +1542,10 @@ static int __write_node_page(struct page } 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; + } if (atomic && !test_opt(sbi, NOBARRIER)) fio.op_flags |= REQ_PREFLUSH | REQ_FUA;