quota: remove sb_has_quota_active in get/set_info
authorChristoph Hellwig <hch@infradead.org>
Fri, 7 May 2010 16:35:40 +0000 (12:35 -0400)
committerJan Kara <jack@suse.cz>
Fri, 21 May 2010 17:30:45 +0000 (19:30 +0200)
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 <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/quota/quota.c

index d6ee49dda4fd1a4bd61ab0002c46bf45effeca21..cfc78826da90902f770f06dbfd34a5beba431097 100644 (file)
@@ -113,8 +113,6 @@ static int quota_getinfo(struct super_block *sb, int type, void __user *addr)
        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_block *sb, int type, void __user *addr)
 
        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);