Skip to content

Commit

Permalink
quota: Remove ->get_xstate and ->get_xstatev callbacks
Browse files Browse the repository at this point in the history
These callbacks are now unused. Remove them.

Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
  • Loading branch information
jankara committed Mar 4, 2015
1 parent e54b2e2 commit 59b6ba6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
14 changes: 4 additions & 10 deletions fs/quota/quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,9 @@ static int quota_getxstate(struct super_block *sb, void __user *addr)
struct fs_quota_stat fqs;
int ret;

if (!sb->s_qcop->get_xstate && !sb->s_qcop->get_state)
if (!sb->s_qcop->get_state)
return -ENOSYS;
if (sb->s_qcop->get_state)
ret = quota_getstate(sb, &fqs);
else
ret = sb->s_qcop->get_xstate(sb, &fqs);
ret = quota_getstate(sb, &fqs);
if (!ret && copy_to_user(addr, &fqs, sizeof(fqs)))
return -EFAULT;
return ret;
Expand Down Expand Up @@ -414,7 +411,7 @@ static int quota_getxstatev(struct super_block *sb, void __user *addr)
struct fs_quota_statv fqs;
int ret;

if (!sb->s_qcop->get_xstatev && !sb->s_qcop->get_state)
if (!sb->s_qcop->get_state)
return -ENOSYS;

memset(&fqs, 0, sizeof(fqs));
Expand All @@ -428,10 +425,7 @@ static int quota_getxstatev(struct super_block *sb, void __user *addr)
default:
return -EINVAL;
}
if (sb->s_qcop->get_state)
ret = quota_getstatev(sb, &fqs);
else
ret = sb->s_qcop->get_xstatev(sb, &fqs);
ret = quota_getstatev(sb, &fqs);
if (!ret && copy_to_user(addr, &fqs, sizeof(fqs)))
return -EFAULT;
return ret;
Expand Down
2 changes: 0 additions & 2 deletions include/linux/quota.h
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,6 @@ struct quotactl_ops {
int (*get_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *);
int (*set_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *);
int (*get_state)(struct super_block *, struct qc_state *);
int (*get_xstate)(struct super_block *, struct fs_quota_stat *);
int (*get_xstatev)(struct super_block *, struct fs_quota_statv *);
int (*rm_xquota)(struct super_block *, unsigned int);
};

Expand Down

0 comments on commit 59b6ba6

Please sign in to comment.