Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3534653imu; Mon, 7 Jan 2019 05:14:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN708SJZoVFP687TVt5eub0rTG9eEptcyHHL9gUPAlYzJg6pnkChd+dxWfTBevEfWh7OEamS X-Received: by 2002:a63:6ecf:: with SMTP id j198mr11082183pgc.3.1546866852306; Mon, 07 Jan 2019 05:14:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546866852; cv=none; d=google.com; s=arc-20160816; b=I9G8KfhQ3s81mxxc6/laI4XyTL5TrrcDCJkloPmgNox6bQBoMWQlIefZYpsNWeORJc 4rMDCuPZkrb6qBlaoxrKhctgySu3JDjPnaVACs1hZy9JFdh5VWU04GOWNvWWPtOc8+xV jVBbYR70DnGltgpgIjEOK29piDA9QCTHV9vffVO3ZQ8Ep5yS7hzHBh90Kbr3R+fwa+ga CT366XH60AWqDhA9HOiGewVeCLe07GRWyyhVHQ9rEBTBW1s9BWJ078A/xIcBb7hvCN+S IJmf3NAjB4KzHNHeC6bH215nG93QDuaM0frGdXvXYUVrdLqThxdxoX23tcQ65V0RGzK+ wyPw== 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=GagdaG/zRtw1pNouE3biD9FOw5AeYpq5VIq/a1wpngI=; b=xksL6YjkErBIQm8gxwLPzOTIMdzkBTxG/YXTdjUks81BWdjthXuaJGQ7CO2PdIYLKb 2H77E+x+1PVjEYVxeyOIgqsqXU3N0R3YT0Ys/Z1VdP+CSHMt4PB5/A2KH6thZboJ7F6d DSGcRWLRUeSrrGWgO4hKdPbaj7r8hOAoFlxxvE7twJdQ6t5BVtYp9kyZkdxeg+Aac6br 3Hy3VSQv6A/Py0pL7nZfyrf8VebwTBEqfyoma3VlnVwOWYR923pAiOfUNY+zkeYSXQL1 WRca1cMMfbx+/bmfRvKTLm6Ez8UMU/T1ykGEpiqiVkHr7j+xFenVbIfU+I/r/ZSC8R0x ahjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MtzSgZWJ; 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 q34si4650967pgk.35.2019.01.07.05.13.57; Mon, 07 Jan 2019 05:14:12 -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=MtzSgZWJ; 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 S1731619AbfAGNIM (ORCPT + 99 others); Mon, 7 Jan 2019 08:08:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:55246 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731596AbfAGNIK (ORCPT ); Mon, 7 Jan 2019 08:08:10 -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 719652089F; Mon, 7 Jan 2019 13:08:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546866490; bh=8IDcVt3ZzckGEbKCaPPLsuTrJ1JFLnth28cd4LkRqIk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MtzSgZWJ7dcY+cg/YdgpcGjsN3yrndxG/rgXHgu556zGzJumtCouvMb6SOd1m5kF5 TUelPTDEBhyn/K3E4pChHCEJ2jCzpFIKmdlwxDftmMfan3vuzoVjlbS5MrbI+59VGj YTcB8jAHwx4Ae7685LUaEf0Nxb1nlqOI0t8NwYac= 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.9 48/71] ext4: fix EXT4_IOC_GROUP_ADD ioctl Date: Mon, 7 Jan 2019 13:33:17 +0100 Message-Id: <20190107105335.457193220@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190107105330.280153213@linuxfoundation.org> References: <20190107105330.280153213@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: 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 @@ -1600,7 +1600,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");