From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753924AbdKNJYm (ORCPT ); Tue, 14 Nov 2017 04:24:42 -0500 Received: from mx2.suse.de ([195.135.220.15]:43878 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752389AbdKNJYc (ORCPT ); Tue, 14 Nov 2017 04:24:32 -0500 Date: Tue, 14 Nov 2017 10:24:30 +0100 From: Jan Kara To: Chao Yu Cc: Jan Kara , jack@suse.com, linux-kernel@vger.kernel.org, chao@kernel.org Subject: Re: [PATCH] quota: be aware of error from dquot_initialize Message-ID: <20171114092430.GB7053@quack2.suse.cz> References: <20171113033148.25464-1-yuchao0@huawei.com> <20171113091835.GA24824@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue 14-11-17 11:43:49, Chao Yu wrote: > On 2017/11/13 17:18, Jan Kara wrote: > > On Mon 13-11-17 11:31:48, Chao Yu wrote: > >> Commit 6184fc0b8dd7 ("quota: Propagate error from ->acquire_dquot()") > >> missed to handle error from dquot_initialize in dquot_file_open, fix it. > >> > >> Signed-off-by: Chao Yu > > > > Good spotting. I've added the patch to my tree. > > Thanks for queuing the patch. :) > > BTW, I notice in add_dquot_ref we also didn't handle error of > __dquot_initialize, should we handle it too? It is questionable what we should do with an error in add_dquot_ref(). User asked us to turn quotas on - that succeeded just fine but then we walked over already active inodes in add_dquot_ref(), wanted to initialize accounting information, and that failed for some inode. We can just leave quota on, the accounting will work for other inodes - that's what we do now. We could also propagate the failure up and refuse to turn quotas off. I guess that's a somewhat better approach so if you want to implement that, go ahead. Honza -- Jan Kara SUSE Labs, CR