From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753193AbdK1O6u (ORCPT ); Tue, 28 Nov 2017 09:58:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:44266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753126AbdK1O6s (ORCPT ); Tue, 28 Nov 2017 09:58:48 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C98D42192A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=chao@kernel.org Subject: Re: [PATCH v2] quota: propagate error from __dquot_initialize To: Jan Kara Cc: jack@suse.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Chao Yu References: <20171123152101.5864-1-chao@kernel.org> <20171127155647.GD5977@quack2.suse.cz> From: Chao Yu Message-ID: <963b2d93-4877-1485-e991-084f64ca2a72@kernel.org> Date: Tue, 28 Nov 2017 22:58:02 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171127155647.GD5977@quack2.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/11/27 23:56, Jan Kara wrote: > On Thu 23-11-17 23:21:01, Chao Yu wrote: >> @@ -2364,10 +2370,11 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id, >> dqopt->flags |= dquot_state_flag(flags, type); >> spin_unlock(&dq_state_lock); >> >> - add_dquot_ref(sb, type); >> - >> - return 0; >> + error = add_dquot_ref(sb, type); >> + if (error) >> + dquot_disable(sb, type, dqopt->flags); > > Why dqopt->flags? If anything these flags are shifted by user/group/project Oh, correct, user/group/project type quota flags are shifted and merged into dqopt->flags.... just notice that, sorry. Let me update the patch. :) Thanks, > shift and combined together for all the types. You need to just pass > 'flags' here. Other than that the patch looks good. > > Honza >