Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3477194imu; Sun, 11 Nov 2018 16:00:54 -0800 (PST) X-Google-Smtp-Source: AJdET5dTKa2GNeYKPwkWTlLTBojzY4Q6HdAvJlf9R8AAJwdfzMhgrsuzDeyjwAMWpYqk+S9+u7Df X-Received: by 2002:a62:7d10:: with SMTP id y16-v6mr17834411pfc.245.1541980854810; Sun, 11 Nov 2018 16:00:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541980854; cv=none; d=google.com; s=arc-20160816; b=fvA1bJmhXTDD1e+OVC7gQPQy9UVXK/WNBgctLnGGDs0lVxMCcrO0A2of/LKnGNu+9p wLIV9P389+4hIoGsj7QUvP2W9JBKNoCrmS4nlA5hDUmtQeiZ2Sf1IfroBGa0mYYcBPO+ XcAGaqCBt4e8ed2mC0zzP05inQwc3HednEjOn9EoqH6mrOG9SekfFRw+hkrr22Eracvc j3vJtkYuI8uMIsb5tDFiPCg1B1GVGwMurrT3VbbMtgj++HU1kqq0VHGvErJKw2GAuNN3 FaIE90W/Y85MszLgoE23Zxi1FajKbBsD64uhGn8WPl+1K9WyfbBFO84aCUp4Arg1V01Q O5vg== 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=cOCAYhKL/NTpkMHrh1PPa15LQBYe1BJhJ1wZU7lEp6s=; b=E/9221SrtciCPjJvgDuafTtYs0xSyIJdu/Zt63JBOSd3odiQ91x5A74TeknFad/ew0 p8uhbUPAT5IfCLO7Xq296U5EEYVkj4ubgDzJGKlP8diuduVY+CF/4Aw9o+P32z8fKj1+ 1B4CSxnwNnPoUFL+gxTbTCivw1EIxDgCBv6/1hsx6BuGe8qDAkUrfWb1sMh/976HuaRe ZPARTwocnQJEH3ADorXXHpCq+Uue/hb3ZvmqXYYzR+mBn8DU38biX0god2M6eW+It0ak w2hJESLGzuUpzmfWbKj85tPAsWBdgTrRBTDs3L/bNZaGR89jDu0yGrVrzzHAqN7Sw6pY v8Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wXsZ8tZh; 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 b8-v6si16820365plm.190.2018.11.11.16.00.39; Sun, 11 Nov 2018 16:00:54 -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=wXsZ8tZh; 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 S1732586AbeKLJt2 (ORCPT + 99 others); Mon, 12 Nov 2018 04:49:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:34210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732375AbeKLISF (ORCPT ); Mon, 12 Nov 2018 03:18:05 -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 2472821104; Sun, 11 Nov 2018 22:28:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975290; bh=WrXwgyGaQu0br4HKh5FZuDS5bTI1MXNvJ8G0kBsxeqE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wXsZ8tZhGJSMSD4srOUwMrglV9UG0An6YPzscZOVuvrhlGqdYTK4TCcHgW5xZYfg7 K+WBr0oX97lTeYcmCn3UamqgRSDpjCrd/GgPjz5gv6QSFe8vAkcHsHXanoMiKSblov XDK7F0yqsTwbjzxA5kiTuXhc5A1iAP6+4D5ZDS6M= 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.19 229/361] ext4: propagate error from dquot_initialize() in EXT4_IOC_FSSETXATTR Date: Sun, 11 Nov 2018 14:19:36 -0800 Message-Id: <20181111221651.371861043@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@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.19-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 @@ -380,7 +380,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) +