From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH 4/3] quota: remove sb_has_quota_active in get/set_info Date: Tue, 11 May 2010 10:33:06 +0200 Message-ID: <20100511083306.GA2832@quack.suse.cz> References: <20100505103937.040319545@bombadil.infradead.org> <20100507163540.GA16331@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: jack@suse.cz, linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from cantor2.suse.de ([195.135.220.15]:53039 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752740Ab0EKIdK (ORCPT ); Tue, 11 May 2010 04:33:10 -0400 Content-Disposition: inline In-Reply-To: <20100507163540.GA16331@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri 07-05-10 12:35:40, Christoph Hellwig wrote: > The methods already do these checks, so remove them in the quotactl > implementation to allow non-VFS quota implementations to also support > these calls. I've merged all four patches into my tree. Honza > > Signed-off-by: Christoph Hellwig > > Index: linux-2.6/fs/quota/quota.c > =================================================================== > --- linux-2.6.orig/fs/quota/quota.c 2010-05-07 18:28:26.438025430 +0200 > +++ linux-2.6/fs/quota/quota.c 2010-05-07 18:30:30.919283361 +0200 > @@ -113,8 +113,6 @@ static int quota_getinfo(struct super_bl > struct if_dqinfo info; > int ret; > > - if (!sb_has_quota_active(sb, type)) > - return -ESRCH; > if (!sb->s_qcop->get_info) > return -ENOSYS; > ret = sb->s_qcop->get_info(sb, type, &info); > @@ -129,8 +127,6 @@ static int quota_setinfo(struct super_bl > > if (copy_from_user(&info, addr, sizeof(info))) > return -EFAULT; > - if (!sb_has_quota_active(sb, type)) > - return -ESRCH; > if (!sb->s_qcop->set_info) > return -ENOSYS; > return sb->s_qcop->set_info(sb, type, &info); -- Jan Kara SUSE Labs, CR