提交 fcbc59f9 编写于 作者: C Christoph Hellwig 提交者: Jan Kara

quota: remove sb_has_quota_active in get/set_info

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: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NJan Kara <jack@suse.cz>
上级 c472b432
...@@ -113,8 +113,6 @@ static int quota_getinfo(struct super_block *sb, int type, void __user *addr) ...@@ -113,8 +113,6 @@ static int quota_getinfo(struct super_block *sb, int type, void __user *addr)
struct if_dqinfo info; struct if_dqinfo info;
int ret; int ret;
if (!sb_has_quota_active(sb, type))
return -ESRCH;
if (!sb->s_qcop->get_info) if (!sb->s_qcop->get_info)
return -ENOSYS; return -ENOSYS;
ret = sb->s_qcop->get_info(sb, type, &info); 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) ...@@ -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))) if (copy_from_user(&info, addr, sizeof(info)))
return -EFAULT; return -EFAULT;
if (!sb_has_quota_active(sb, type))
return -ESRCH;
if (!sb->s_qcop->set_info) if (!sb->s_qcop->set_info)
return -ENOSYS; return -ENOSYS;
return sb->s_qcop->set_info(sb, type, &info); return sb->s_qcop->set_info(sb, type, &info);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册