Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3724984imu; Mon, 7 Jan 2019 08:20:43 -0800 (PST) X-Google-Smtp-Source: ALg8bN6SJDmJk1TsyG2N67kN39ViMRCfarV/D9vFoL4BQ2D0MFFPX/X0dKqNQewU0FBoA5Umn0ml X-Received: by 2002:a17:902:74cc:: with SMTP id f12mr62364215plt.134.1546878043169; Mon, 07 Jan 2019 08:20:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546878043; cv=none; d=google.com; s=arc-20160816; b=Viiy3ourGg2s1ZxLFGIOz+7QrfOjdLY4Wx2o3Zziq5frCu+30RZcf/Q8EJ8GoniFsP y9pMKeNzM0ws6yIDSyTvBoCMSI8VXvjJipy826WJBPwXTw9gWndN+2qFGjRjP5XlopU0 oPEQenPTOAFTeyZXAQXizMUoNi6QH5DtavQxTcdj/vREPrbm4Wh1lylE1xrgRshzw3AW KL1/nYClO0TmuOtCV25Tm0GOwo05X3Db3uB+mjN0mDCzNGU+R1Y+rURl1MUt9THzTAbn 51vCps7aAbWI84/R+35IjaNu1/+QbbARDg+RYqFqF2nrhiGb3hMOReZGOCho5XCnfcRd GfGQ== 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=2JSePjpyfoXuZtwCkMjdjYa9rGA9/4y/uyfVuJFsMrk=; b=sC5UVfWOW3Rit9hZjkY1Jk/fCmYOd1QG5QUFiDij2VoXIsjfF1UCo1RRXnI0b0z1vB i8tUP5qip4cjh7uYAyb71rshM26SXjapNnnppf2SHEv5rtC+JHjdfO0OEJRNUXSDEdfZ VWGFlozRkVqWLrMKpg92WK3NtSI/AlsvAWYKDlZohY8dEVUyTJubOrWEf6xuKDaAKC+y 686Uw8qGofMg8OtQNIpxnuRduDYa+NXV0T+U4aVIrzyAGObn4h83RuJbQrmrCIdNE8zI sOY8D39QaZcWZ+q8j77XmyvQ47XZM1tmIoa/u6oiXDKLJB4S32GVTVlVaFU4h+aj62if 6Iew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rvu+KusC; 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 m75si16473360pga.432.2019.01.07.08.20.27; Mon, 07 Jan 2019 08:20:43 -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=rvu+KusC; 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 S1730219AbfAGNCm (ORCPT + 99 others); Mon, 7 Jan 2019 08:02:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:50136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730831AbfAGNCh (ORCPT ); Mon, 7 Jan 2019 08:02:37 -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 08523206BB; Mon, 7 Jan 2019 13:02:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546866156; bh=EzTRVvksDdEx31li63y0GS73ZDwuZ+zcZcNfj0DXa5s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rvu+KusCKl+Z99EwyKWAF5ikAS70eBYGyCRrycQcSHLRbWnjqkOPYjVoyQGJ73CkF JbYprYz4/XPpqEA1zDzjxkrk5by0IQSf1qHYB5lp33MRTebFqyfR6Wqmddj/5n8IAb uxgISdKGAwlHvnGRay3duXYs61eBhf7CCDvswWrE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maurizio Lombardi , Theodore Tso , stable@kernel.org Subject: [PATCH 4.14 064/101] ext4: missing unlock/put_page() in ext4_try_to_write_inline_data() Date: Mon, 7 Jan 2019 13:32:52 +0100 Message-Id: <20190107105336.462666060@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190107105330.372621917@linuxfoundation.org> References: <20190107105330.372621917@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.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Maurizio Lombardi commit 132d00becb31e88469334e1e62751c81345280e0 upstream. In case of error, ext4_try_to_write_inline_data() should unlock and release the page it holds. Fixes: f19d5870cbf7 ("ext4: add normal write support for inline data") Cc: stable@kernel.org # 3.8 Signed-off-by: Maurizio Lombardi Signed-off-by: Theodore Ts'o Signed-off-by: Greg Kroah-Hartman --- fs/ext4/inline.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -711,8 +711,11 @@ int ext4_try_to_write_inline_data(struct if (!PageUptodate(page)) { ret = ext4_read_inline_page(inode, page); - if (ret < 0) + if (ret < 0) { + unlock_page(page); + put_page(page); goto out_up_read; + } } ret = 1;