From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: [PATCH 4/3] quota: remove sb_has_quota_active in get/set_info Date: Fri, 7 May 2010 12:35:40 -0400 Message-ID: <20100507163540.GA16331@infradead.org> References: <20100505103937.040319545@bombadil.infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: jack@suse.cz Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:33538 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756605Ab0EGQfl (ORCPT ); Fri, 7 May 2010 12:35:41 -0400 Content-Disposition: inline In-Reply-To: <20100505103937.040319545@bombadil.infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: The methods already do these checks, so remove them in the quotactl implementation to allow non-VFS quota implementations to also support these calls. 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);