diff options
author | Theodore Ts'o <tytso@mit.edu> | 2011-10-05 13:26:59 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-10-05 13:26:59 -0400 |
commit | b5ba6f5b9da9d4e3d6f52ef9470ec12a161b1a7f (patch) | |
tree | 101e6bc35eca87c2f6e013e0d8fcc878747e269c /lib/quota | |
parent | d730094243d48d2f63215c4eb783895e4a5ada85 (diff) | |
download | e2fsprogs-b5ba6f5b9da9d4e3d6f52ef9470ec12a161b1a7f.tar.gz |
libquota: remove flag argument to commit_dquot()
The flag parameter wasn't being used, and using it meant that we had
to define the COMMIT_* flags, which relied on the QIF_* flags being
present. Removing this allows for increased portability.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib/quota')
-rw-r--r-- | lib/quota/mkquota.c | 2 | ||||
-rw-r--r-- | lib/quota/quotaio.h | 9 | ||||
-rw-r--r-- | lib/quota/quotaio_v2.c | 4 |
3 files changed, 4 insertions, 11 deletions
diff --git a/lib/quota/mkquota.c b/lib/quota/mkquota.c index 35cac664..54400031 100644 --- a/lib/quota/mkquota.c +++ b/lib/quota/mkquota.c @@ -127,7 +127,7 @@ static void write_dquots(dict_t *dict, struct quota_handle *qh) if (dq) { dq->dq_h = qh; update_grace_times(dq); - qh->qh_ops->commit_dquot(dq, COMMIT_ALL); + qh->qh_ops->commit_dquot(dq); } } } diff --git a/lib/quota/quotaio.h b/lib/quota/quotaio.h index 333a59fa..282b543b 100644 --- a/lib/quota/quotaio.h +++ b/lib/quota/quotaio.h @@ -101,13 +101,6 @@ struct dquot { struct util_dqblk dq_dqb; /* Parsed data of dquot */ }; -/* Flags for commit function (have effect only when quota in kernel is - * turned on) */ -#define COMMIT_USAGE QIF_USAGE -#define COMMIT_LIMITS QIF_LIMITS -#define COMMIT_TIMES QIF_TIMES -#define COMMIT_ALL (COMMIT_USAGE | COMMIT_LIMITS | COMMIT_TIMES) - /* Structure of quotafile operations */ struct quotafile_ops { /* Check whether quotafile is in our format */ @@ -123,7 +116,7 @@ struct quotafile_ops { /* Read dquot into memory */ struct dquot *(*read_dquot) (struct quota_handle *h, qid_t id); /* Write given dquot to disk */ - int (*commit_dquot) (struct dquot *dquot, int flag); + int (*commit_dquot) (struct dquot *dquot); /* Scan quotafile and call callback on every structure */ int (*scan_dquots) (struct quota_handle *h, int (*process_dquot) (struct dquot *dquot, diff --git a/lib/quota/quotaio_v2.c b/lib/quota/quotaio_v2.c index 35512c0f..7c9e4f70 100644 --- a/lib/quota/quotaio_v2.c +++ b/lib/quota/quotaio_v2.c @@ -25,7 +25,7 @@ static int v2_init_io(struct quota_handle *h); static int v2_new_io(struct quota_handle *h); static int v2_write_info(struct quota_handle *h); static struct dquot *v2_read_dquot(struct quota_handle *h, qid_t id); -static int v2_commit_dquot(struct dquot *dquot, int flags); +static int v2_commit_dquot(struct dquot *dquot); static int v2_scan_dquots(struct quota_handle *h, int (*process_dquot) (struct dquot *dquot, char *dqname)); @@ -285,7 +285,7 @@ static struct dquot *v2_read_dquot(struct quota_handle *h, qid_t id) * became fake one and user has no blocks. * User can process use 'errno' to detect errstr. */ -static int v2_commit_dquot(struct dquot *dquot, int flags) +static int v2_commit_dquot(struct dquot *dquot) { struct util_dqblk *b = &dquot->dq_dqb; |