From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752820AbdKNDoF (ORCPT ); Mon, 13 Nov 2017 22:44:05 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:10478 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750806AbdKNDoE (ORCPT ); Mon, 13 Nov 2017 22:44:04 -0500 Subject: Re: [PATCH] quota: be aware of error from dquot_initialize To: Jan Kara CC: , , References: <20171113033148.25464-1-yuchao0@huawei.com> <20171113091835.GA24824@quack2.suse.cz> From: Chao Yu Message-ID: Date: Tue, 14 Nov 2017 11:43:49 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171113091835.GA24824@quack2.suse.cz> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.5A0A6679.009F,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 8dbd5c3e7a13740bc36c1a8c1f4249ab Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks, > > Honza > >> --- >> fs/quota/dquot.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c >> index 50b0556a124f..80002c094647 100644 >> --- a/fs/quota/dquot.c >> +++ b/fs/quota/dquot.c >> @@ -2133,7 +2133,7 @@ int dquot_file_open(struct inode *inode, struct file *file) >> >> error = generic_file_open(inode, file); >> if (!error && (file->f_mode & FMODE_WRITE)) >> - dquot_initialize(inode); >> + error = dquot_initialize(inode); >> return error; >> } >> EXPORT_SYMBOL(dquot_file_open); >> -- >> 2.15.0.55.gc2ece9dc4de6 >> >>