diff options
author | Theodore Ts'o <tytso@mit.edu> | 2017-02-05 21:01:45 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-02-05 21:01:45 -0500 |
commit | a88963d03b10029b260b0a4f5fc34e39f7ec0010 (patch) | |
tree | 69511ba8e38f4a443b0845ab1e0a637b7ed4bf12 | |
parent | 1a1c849fcaddf0671539b6dc360d42185c64ac43 (diff) | |
parent | 33415b11a1f867334884b432577625cddf8904ec (diff) | |
download | e2fsprogs-debian.tar.gz |
Merge branch 'master' into debiandebian
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | misc/tune2fs.c | 20 |
2 files changed, 17 insertions, 10 deletions
diff --git a/debian/changelog b/debian/changelog index 2a9410e78..2dad06690 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +e2fsprogs (1.43.4-3) UNRELEASED; urgency=medium + + * Fix tune2fs regression introduced in 1.43.4 --- enabling additional + quota types has become a no-op. + + -- Theodore Y. Ts'o <tytso@mit.edu> Sun, 05 Feb 2017 20:46:55 -0500 + e2fsprogs (1.43.4-2) unstable; urgency=medium * Re-enable metadata_csum for Debian (which was accidentally disabled diff --git a/misc/tune2fs.c b/misc/tune2fs.c index 623957766..f1bad6060 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -1483,7 +1483,7 @@ static void handle_quota_options(ext2_filsys fs) quota_ctx_t qctx; ext2_ino_t qf_ino; enum quota_type qtype; - int enable = 0; + unsigned int qtype_bits = 0; for (qtype = 0 ; qtype < MAXQUOTAS; qtype++) if (quota_enable[qtype] != 0) @@ -1492,19 +1492,19 @@ static void handle_quota_options(ext2_filsys fs) /* Nothing to do. */ return; - retval = quota_init_context(&qctx, fs, 0); + for (qtype = 0; qtype < MAXQUOTAS; qtype++) { + if (quota_enable[qtype] == QOPT_ENABLE) + qtype_bits |= 1 << qtype; + } + + retval = quota_init_context(&qctx, fs, qtype_bits); if (retval) { com_err(program_name, retval, _("while initializing quota context in support library")); exit(1); } - for (qtype = 0 ; qtype < MAXQUOTAS; qtype++) { - if (quota_enable[qtype] == QOPT_ENABLE) { - enable = 1; - break; - } - } - if (enable) + + if (qtype_bits) quota_compute_usage(qctx); for (qtype = 0 ; qtype < MAXQUOTAS; qtype++) { @@ -1540,7 +1540,7 @@ static void handle_quota_options(ext2_filsys fs) quota_release_context(&qctx); - if (enable) { + if (qtype_bits) { ext2fs_set_feature_quota(fs->super); ext2fs_mark_super_dirty(fs); } else { |