Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1323210yba; Tue, 2 Apr 2019 06:52:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDcMrMSJKHDxBB0Lx7o623cuk+XVHmCzOqbARkC5cJOoUEQQiRTRdHoLvwZrzFe2/f/VHr X-Received: by 2002:a65:6107:: with SMTP id z7mr52904320pgu.313.1554213163269; Tue, 02 Apr 2019 06:52:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554213163; cv=none; d=google.com; s=arc-20160816; b=glm9svIX5I4K9jizyWmMcucMGbanOC57HEzOntVP8EEmqZkZZ1mAfJzV/4+8QspYaj W9FTuhCIqGXQgg2lHQrcgNzzSEVqnwkP3rIsYrZnJqK5ckwWYYbWB/NgAodU0jN3tGh9 6NF+x7iAjc9mUY13nGHfKzm7XFMgYZ7hVzyE3aIk64auDWt/UPS40Pi5jXwQ1P300TTJ h3lWG+H2Q+OdJquFfpvP3o3cVMjO7Xm2Y7hrF+fiZumByAwC6MqEzxfyBMReWFeU/4vA BDPDinXTbgTfe1b3gMBKKuNSyEMTdJ1Cv3Xa/3B9hJ72iTrDfWQq5ZVEO2ugVTUlpl/+ W5BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=22NoK9gzTk8W39Dcw2Ll5KhDm3hiKIJbbnfpPY9s6Z4=; b=Uf4tn42uzRmr/5YPQS3ZdEC2oHvs6JA48NIbggiOWkZtQUMYrTfVQNPE/BHS1V1EEE yRDIsHQE3c+QJxq027TsujxvjZ0b+rVhVD5avk3CN5J2IehcJdx9vSqyEqdK7tUAMsKM uLtT5Q3lxK7GrQ+lGHhpxwAa2zvE9wivdvnE37zc0NG2yXlz2A9u6vFx0oOVIvY6ijIg x7MPfKB3j8sL9Bpmugn1WEKE3cM6Xxwo+2n+tGoFv7Pm+w7px/d/4sgsqKHN8hu6rvOS yfTM4rhV5CFq5q/CHn3MhddiX12vGlMh8/ks3G5QR9r3MuIRO3prQVqVB9fE0h+luGL5 3Pug== 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 a22si11044175plm.263.2019.04.02.06.52.27; Tue, 02 Apr 2019 06:52:43 -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 S1732254AbfDBNts (ORCPT + 99 others); Tue, 2 Apr 2019 09:49:48 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:42830 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731158AbfDBNkB (ORCPT ); Tue, 2 Apr 2019 09:40:01 -0400 Received: from [167.98.27.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hBJdv-0002n3-AN; Tue, 02 Apr 2019 14:39:59 +0100 Received: from ben by deadeye with local (Exim 4.92) (envelope-from ) id 1hBJdu-0004s7-8W; Tue, 02 Apr 2019 14:39:58 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Theodore Ts'o" , "Maurizio Lombardi" Date: Tue, 02 Apr 2019 14:38:27 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 21/99] ext4: missing unlock/put_page() in ext4_try_to_write_inline_data() In-Reply-To: X-SA-Exim-Connect-IP: 167.98.27.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.65-rc1 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") Signed-off-by: Maurizio Lombardi Signed-off-by: Theodore Ts'o Signed-off-by: Ben Hutchings --- fs/ext4/inline.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -704,8 +704,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;