summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>2015-03-06 20:51:52 +0300
committerJan Kara <jack@suse.cz>2015-03-08 11:11:35 +0100
commit4d38a6af4f6aad3621506fb91a4a282ca2ec188e (patch)
tree88926c20ca5f4c501615478b8be407c888cca4c8
parent9ccafdb0ff8666ff7a1c2d86400a7304db03b421 (diff)
downloadquota-tools-4d38a6af4f6aad3621506fb91a4a282ca2ec188e.tar.gz
edquota: fix mtime check
Otherwise tool never updates quota because old mtime always <= new. Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r--edquota.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/edquota.c b/edquota.c
index fb1d5a8..f161bf3 100644
--- a/edquota.c
+++ b/edquota.c
@@ -309,7 +309,7 @@ int main(int argc, char **argv)
goto out;
}
/* File not modified? */
- if (timespec_cmp(&mtime, &st.st_mtim) <= 0)
+ if (timespec_cmp(&mtime, &st.st_mtim) == 0)
goto out;
if (readtimes(handles, tmpfd) < 0) {
errstr(_("Failed to parse grace times file.\n"));
@@ -361,7 +361,7 @@ int main(int argc, char **argv)
goto next_user;
}
/* File not modified? */
- if (timespec_cmp(&mtime, &st.st_mtim) <= 0)
+ if (timespec_cmp(&mtime, &st.st_mtim) == 0)
goto next_user;
if (flags & FL_EDIT_TIMES) {
if (readindividualtimes(curprivs, tmpfd) < 0) {