Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3430518imu; Sun, 11 Nov 2018 14:56:55 -0800 (PST) X-Google-Smtp-Source: AJdET5cYmsSJp2joerlmiZ8/mM4/ae3gCq+Khn52dDkw4Ihsr+tZrAtof8QVOut3syYqATirJqgb X-Received: by 2002:a63:741:: with SMTP id 62mr15000936pgh.352.1541977015493; Sun, 11 Nov 2018 14:56:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977015; cv=none; d=google.com; s=arc-20160816; b=f2tf76pVb25ntws+q362OjPd7+8zENAWFR5x3W9SxIJoqn3b1+lUuvS8WY+Vz/ADuS I942nyChzp0ywNxmcooDEs2sStBT/SznAAjJ8+RBAs3pGma1w0V1w5kVj/3FUgyPqSYS paqYschz+vFmOdQNw9yv8dnIKs0eVbJAhowI/oP71ZVsjvcq52Cimg05UvYLiCt0mYqQ fBN8MCv4e9K4uWCuaMIqzC7dOuhtBBFojzeRym9N+SrggEOCL/0UuKBIWiZZirartYh9 HSk+RyiFITOXUt2WbuT6pvrnpAB8/1qqWi7U0ZSzg2qHXNWiWkMQ7oVzq3XQxfPB/bBe PPhQ== 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=lT0T4o2vOuJQwXuayXSZIxQcjR1nQRMJfy/3xjIIR/c=; b=Sk2G6NeVXKeRVIcU0652vW8ODQ2qBRTyUe5FAm9OSL9p8iA2pQo4KmkPQEVmHlaXfJ 0HQRjJ/1fPJQHJQQA/IABgOQ/mIsa6zgEab4f/OvoYYFLdYkHRzAPgri3ACFfWIolFrj Qgif4KFh92qxppQeQo8jFxxvL6t657q15s3Wt2Z++QmJa3f7VFd55yp4VGvGIf9Lfccn cbDoqlWTA4bjTa20sRHgmk98XIzSjc1hHW1+jXnb1FnC+MzTWkeutoraittSpoETTB3T SYWRhiGJXssZXhcZHLe7xbCyJ0FSQjNM26rv18WaMx49EohjzbZIrgBszCForubBW2uf eQKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KiIrdsbV; 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 l185si14052047pgd.253.2018.11.11.14.56.40; Sun, 11 Nov 2018 14:56:55 -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=KiIrdsbV; 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 S2403962AbeKLIqR (ORCPT + 99 others); Mon, 12 Nov 2018 03:46:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:54642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403885AbeKLIWw (ORCPT ); Mon, 12 Nov 2018 03:22:52 -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 A1B2421582; Sun, 11 Nov 2018 22:32:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975575; bh=hVzgAiNdnDK/obEIybjKUqt8S3/DnPkoy3mrQU7ZhTk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KiIrdsbV7iHoU8k/YjsL1sHeGUP1ye3dqs1H/xbQ/8sVi66S+ePsiVxquknsDQhR3 Si91SdMxSgFFd/J/b9PaLXpnliWH++CWHZe9ZehgNM7uTu47rAQ54R09/5jSdGRnnZ /M0pfISsDH5WrMQNlZaTx9NeDsHoUINWtEgWQxw8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wang Shilong , Theodore Tso , stable@kernel.org Subject: [PATCH 4.14 139/222] ext4: propagate error from dquot_initialize() in EXT4_IOC_FSSETXATTR Date: Sun, 11 Nov 2018 14:23:56 -0800 Message-Id: <20181111221659.968268062@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@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.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wang Shilong commit 182a79e0c17147d2c2d3990a9a7b6b58a1561c7a upstream. We return most failure of dquota_initialize() except inode evict, this could make a bit sense, for example we allow file removal even quota files are broken? But it dosen't make sense to allow setting project if quota files etc are broken. Signed-off-by: Wang Shilong Signed-off-by: Theodore Ts'o Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman --- fs/ext4/ioctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c @@ -364,7 +364,9 @@ static int ext4_ioctl_setproject(struct brelse(iloc.bh); } - dquot_initialize(inode); + err = dquot_initialize(inode); + if (err) + return err; handle = ext4_journal_start(inode, EXT4_HT_QUOTA, EXT4_QUOTA_INIT_BLOCKS(sb) +