Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1157733imm; Wed, 1 Aug 2018 11:08:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd+aE3dVGF3C1QX8o1+Yy4V57G9hl1JVw7dTYzhYw7Eaba7J9NyoQffsl4v82lUGZ/NEKyW X-Received: by 2002:a65:4b87:: with SMTP id t7-v6mr25275329pgq.391.1533146890529; Wed, 01 Aug 2018 11:08:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533146890; cv=none; d=google.com; s=arc-20160816; b=sMjCJ1gL3MBA3pcpODvDpmeRSLllNwd2vD8NTAlAqEVHW1cp7yqUANrgDsWZLvsUv0 sjfkUPK1MQ6I2RhsgPGk1T3+3AusfwLj1XtO8+OwHI+XkOfG4yGUv6Tp4oHF7gislOt4 ntNMDT10m/oDpyRFgQk7PnUY/IXqrdLEPhgcQ4tfBMID9KrgRZnqMWDuaAU80aPHpFX9 /NPcpPEcNsvPB85DDwPFEfkngcwSPh+zBYehXr4YrktYwfUQ7yr/vKQuUIwQHOBn1wIM lLs4vPVeIi/FB8Rj0lLuz7thyZL3WDnLqXY3i3LuxrdwB12ycEIoo+IoGwFD6gYTlZFS bqxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Krdb3OCTG7oTPuXc2QG8UcHh3jh8aQmFJQyc64UgR84=; b=DF7IocTmWI1LKmCCPGN4xuEle7uEQW7Q5lnH+YrIY8N13ZOGUJn0FjnF/AaY8EwvJe W5X3vN1FdYLVoTOAp3j+mo8vvyEtZOD/9Cy8g+h/1VF7shunR0dNYO53GPhDlXc3yrUz qu3rd/p4/jSQRFD2MxmQrhmdljWALwi+J6L3zmU88UqXgzOQRW4Iv3bQFO7AXT4JWP4J ET/CioLQj4ULAUxzF78kka3q78q/G8oE67gmCZeYNcgLc5Xu81rKR1iKQmzucJMpz4oB p68YcV0yfbo1+OM5+Il3LV/I4BUFlbMWLTbVWmUbGrkXtjyCZqfZqXYctG9d2eX6TgKv aFnw== 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 j72-v6si17347445pfe.187.2018.08.01.11.07.55; Wed, 01 Aug 2018 11:08:10 -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 S1732475AbeHATx1 (ORCPT + 99 others); Wed, 1 Aug 2018 15:53:27 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49794 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405814AbeHATIh (ORCPT ); Wed, 1 Aug 2018 15:08:37 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5FE5013A6; Wed, 1 Aug 2018 17:14:57 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chao Yu , Jaegeuk Kim , Sasha Levin Subject: [PATCH 4.14 060/246] f2fs: fix to detect failure of dquot_initialize Date: Wed, 1 Aug 2018 18:49:30 +0200 Message-Id: <20180801165014.582804288@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: Chao Yu [ Upstream commit c22aecd75919511abea872b201751e0be1add898 ] dquot_initialize() can fail due to any exception inside quota subsystem, f2fs needs to be aware of it, and return correct return value to caller. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- fs/f2fs/file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -2493,7 +2493,9 @@ static int f2fs_ioc_setproject(struct fi } f2fs_put_page(ipage, 1); - dquot_initialize(inode); + err = dquot_initialize(inode); + if (err) + goto out_unlock; transfer_to[PRJQUOTA] = dqget(sb, make_kqid_projid(kprojid)); if (!IS_ERR(transfer_to[PRJQUOTA])) {