Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3524207imu; Mon, 7 Jan 2019 05:04:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN5eOTmZVdDTS2x65kr2Ehmcyijf1fpeopTHxVrYrJ80K/Po0VBzFOldCWJKnhS60OBURNIi X-Received: by 2002:a17:902:8ec9:: with SMTP id x9mr61717667plo.27.1546866289463; Mon, 07 Jan 2019 05:04:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546866289; cv=none; d=google.com; s=arc-20160816; b=UAiTSMwqqfaEWcA+VuLN+RY+uEVwV/jKHdxN2pN3egIxxl/w1tO/ARjzSZaDM13xAu KDoMf0xveq0C3iOi+ehPNKrpxtll86wOzx/NCJff9ObeKDwou4eSuD82UQC1ToGZb3Ar R4QvAxJJE3H0lub0gs+rOm0uPnPUN1e+oizrptB7pZT+GQOhB/lv83kI7H+43hT1tg5m eioKtGH9Vo6EatFXVT0qEnv17CIf8vQm/4agyGRDDIi7MEjiQyH3dCI8T6ci5VLrzbVU yOcqPAWEzxHUVs54qSeg+oyRc5qFCUW2duhOI6yxLaLnaTowLaCMF5bVe9QG7mVRMcgQ SGWw== 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=AWI7qDM4tYs9tqMqVWheW/hlyw7FHTqK/AYJRG7hToQ=; b=ar+SeIPy7TBEzhBuaIV8XrScOQF/55mHXU93YiihW5XThY/8h7JccNCpNHJqZxteHX PkIdkzegP+DUDrEgOhPImi4SHkm3VskT+VMIVsjKM0ghj9yS0fhvISoR2NlKKVq8pbF2 ABX3iNRHscfW7irNFFnPKy7XeL0OOioE099CYesSNjFv5jH5yg/bqGBaOxLUQWju/SbJ ex0RxAUaiIzfkY6HT1wYubAeh7ZrQSdE8mmDMGGOepFjj4QkGbDPUAXILxMFN0VSpBzh ed7fthTCQhntvNPxJIvk4YGnuxPEOozk9Dwqw6VS05zidzXSUOp1rGoCLFW8wK9Ml4mS kjXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="dqZQtJh/"; 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 p14si7963745plq.25.2019.01.07.05.04.33; Mon, 07 Jan 2019 05:04:49 -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="dqZQtJh/"; 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 S1730861AbfAGNCo (ORCPT + 99 others); Mon, 7 Jan 2019 08:02:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:50180 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730838AbfAGNCk (ORCPT ); Mon, 7 Jan 2019 08:02:40 -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 E9175206BB; Mon, 7 Jan 2019 13:02:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546866159; bh=OEo0eb4Xnfw/PzQrKCMRXdsOH0wPFMiqWL6ijjwyJHM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dqZQtJh/wpbWtO5KZ0X+ePbV/xZg6/87EZaU0XNNx0+BGYdc63g7lUqVpZA475SiX GwWuiS8yX82YuUaxWQ2CAlwBwRQMOQ8+03AflAsTOjGcp+YRKhjy08Xs/sevj+oCVG 7zIx8+7c9t8tZNVWZeiICnmrb8X4ntb/GCRg0c1k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Theodore Tso , =?UTF-8?q?ruippan=20 ?= , stable@kernel.org Subject: [PATCH 4.14 065/101] ext4: fix EXT4_IOC_GROUP_ADD ioctl Date: Mon, 7 Jan 2019 13:32:53 +0100 Message-Id: <20190107105336.509408302@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: ruippan (潘睿) commit e647e29196b7f802f8242c39ecb7cc937f5ef217 upstream. Commit e2b911c53584 ("ext4: clean up feature test macros with predicate functions") broke the EXT4_IOC_GROUP_ADD ioctl. This was not noticed since only very old versions of resize2fs (before e2fsprogs 1.42) use this ioctl. However, using a new kernel with an enterprise Linux userspace will cause attempts to use online resize to fail with "No reserved GDT blocks". Fixes: e2b911c53584 ("ext4: clean up feature test macros with predicate...") Cc: stable@kernel.org # v4.4 Signed-off-by: Theodore Ts'o Signed-off-by: ruippan (潘睿) Signed-off-by: Greg Kroah-Hartman --- fs/ext4/resize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -1602,7 +1602,7 @@ int ext4_group_add(struct super_block *s } if (reserved_gdb || gdb_off == 0) { - if (ext4_has_feature_resize_inode(sb) || + if (!ext4_has_feature_resize_inode(sb) || !le16_to_cpu(es->s_reserved_gdt_blocks)) { ext4_warning(sb, "No reserved GDT blocks, can't resize");