From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752784AbdK0P4v (ORCPT ); Mon, 27 Nov 2017 10:56:51 -0500 Received: from mx2.suse.de ([195.135.220.15]:36362 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752281AbdK0P4t (ORCPT ); Mon, 27 Nov 2017 10:56:49 -0500 Date: Mon, 27 Nov 2017 16:56:47 +0100 From: Jan Kara To: Chao Yu Cc: jack@suse.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Chao Yu Subject: Re: [PATCH v2] quota: propagate error from __dquot_initialize Message-ID: <20171127155647.GD5977@quack2.suse.cz> References: <20171123152101.5864-1-chao@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171123152101.5864-1-chao@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 shift and combined together for all the types. You need to just pass 'flags' here. Other than that the patch looks good. Honza -- Jan Kara SUSE Labs, CR