diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2013-01-31 23:09:30 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-13 09:15:08 -0500 |
commit | 236c64e4b79b78059ec3e17362d8f02f6dc06f26 (patch) | |
tree | 14540b22e3b3e5d934a8bf2c85651063a327c798 /fs/gfs2 | |
parent | 05e0a60d8025e280e56b3fa36ea8facc7c1c65c2 (diff) |
gfs2: Remove the QUOTA_USER and QUOTA_GROUP defines
Remove the QUOTA_USER and QUOTA_GRUP defines. Remove
the last vestigal users of QUOTA_USER and QUOTA_GROUP.
Now that struct kqid is used throughout the gfs2 quota
code the need there is to use QUOTA_USER and QUOTA_GROUP
and the defines are just extraneous and confusing.
Cc: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/quota.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 8cb4d10cb16a..0bbb0407fd96 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c | |||
@@ -65,9 +65,6 @@ | |||
65 | #include "inode.h" | 65 | #include "inode.h" |
66 | #include "util.h" | 66 | #include "util.h" |
67 | 67 | ||
68 | #define QUOTA_USER 1 | ||
69 | #define QUOTA_GROUP 0 | ||
70 | |||
71 | struct gfs2_quota_change_host { | 68 | struct gfs2_quota_change_host { |
72 | u64 qc_change; | 69 | u64 qc_change; |
73 | u32 qc_flags; /* GFS2_QCF_... */ | 70 | u32 qc_flags; /* GFS2_QCF_... */ |
@@ -1476,18 +1473,14 @@ static int gfs2_get_dqblk(struct super_block *sb, struct kqid qid, | |||
1476 | struct gfs2_quota_data *qd; | 1473 | struct gfs2_quota_data *qd; |
1477 | struct gfs2_holder q_gh; | 1474 | struct gfs2_holder q_gh; |
1478 | int error; | 1475 | int error; |
1479 | int type; | ||
1480 | 1476 | ||
1481 | memset(fdq, 0, sizeof(struct fs_disk_quota)); | 1477 | memset(fdq, 0, sizeof(struct fs_disk_quota)); |
1482 | 1478 | ||
1483 | if (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF) | 1479 | if (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF) |
1484 | return -ESRCH; /* Crazy XFS error code */ | 1480 | return -ESRCH; /* Crazy XFS error code */ |
1485 | 1481 | ||
1486 | if (qid.type == USRQUOTA) | 1482 | if ((qid.type != USRQUOTA) && |
1487 | type = QUOTA_USER; | 1483 | (qid.type != GRPQUOTA)) |
1488 | else if (qid.type == GRPQUOTA) | ||
1489 | type = QUOTA_GROUP; | ||
1490 | else | ||
1491 | return -EINVAL; | 1484 | return -EINVAL; |
1492 | 1485 | ||
1493 | error = qd_get(sdp, qid, &qd); | 1486 | error = qd_get(sdp, qid, &qd); |
@@ -1499,7 +1492,7 @@ static int gfs2_get_dqblk(struct super_block *sb, struct kqid qid, | |||
1499 | 1492 | ||
1500 | qlvb = (struct gfs2_quota_lvb *)qd->qd_gl->gl_lksb.sb_lvbptr; | 1493 | qlvb = (struct gfs2_quota_lvb *)qd->qd_gl->gl_lksb.sb_lvbptr; |
1501 | fdq->d_version = FS_DQUOT_VERSION; | 1494 | fdq->d_version = FS_DQUOT_VERSION; |
1502 | fdq->d_flags = (type == QUOTA_USER) ? FS_USER_QUOTA : FS_GROUP_QUOTA; | 1495 | fdq->d_flags = (qid.type == USRQUOTA) ? FS_USER_QUOTA : FS_GROUP_QUOTA; |
1503 | fdq->d_id = from_kqid_munged(current_user_ns(), qid); | 1496 | fdq->d_id = from_kqid_munged(current_user_ns(), qid); |
1504 | fdq->d_blk_hardlimit = be64_to_cpu(qlvb->qb_limit) << sdp->sd_fsb2bb_shift; | 1497 | fdq->d_blk_hardlimit = be64_to_cpu(qlvb->qb_limit) << sdp->sd_fsb2bb_shift; |
1505 | fdq->d_blk_softlimit = be64_to_cpu(qlvb->qb_warn) << sdp->sd_fsb2bb_shift; | 1498 | fdq->d_blk_softlimit = be64_to_cpu(qlvb->qb_warn) << sdp->sd_fsb2bb_shift; |
@@ -1526,21 +1519,13 @@ static int gfs2_set_dqblk(struct super_block *sb, struct kqid qid, | |||
1526 | int alloc_required; | 1519 | int alloc_required; |
1527 | loff_t offset; | 1520 | loff_t offset; |
1528 | int error; | 1521 | int error; |
1529 | int type; | ||
1530 | 1522 | ||
1531 | if (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF) | 1523 | if (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF) |
1532 | return -ESRCH; /* Crazy XFS error code */ | 1524 | return -ESRCH; /* Crazy XFS error code */ |
1533 | 1525 | ||
1534 | switch(qid.type) { | 1526 | if ((qid.type != USRQUOTA) && |
1535 | case USRQUOTA: | 1527 | (qid.type != GRPQUOTA)) |
1536 | type = QUOTA_USER; | ||
1537 | break; | ||
1538 | case GRPQUOTA: | ||
1539 | type = QUOTA_GROUP; | ||
1540 | break; | ||
1541 | default: | ||
1542 | return -EINVAL; | 1528 | return -EINVAL; |
1543 | } | ||
1544 | 1529 | ||
1545 | if (fdq->d_fieldmask & ~GFS2_FIELDMASK) | 1530 | if (fdq->d_fieldmask & ~GFS2_FIELDMASK) |
1546 | return -EINVAL; | 1531 | return -EINVAL; |