From 14ee7bcbf0bdd6553dc1b78898ae429aae644100 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Mon, 1 Aug 2016 09:01:15 -0400 Subject: [PATCH] ceph: don't fudge the ctime in stat() unless it's really older than the mtime The current code just looks at the sec field, but the difference may only be evident in the nsec field. Signed-off-by: Jeff Layton --- src/client/Client.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 93ffd07bb29..2df632fc0e0 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -6681,7 +6681,7 @@ int Client::fill_stat(Inode *in, struct stat *st, frag_info_t *dirstat, nest_inf st->st_nlink = in->nlink; st->st_uid = in->uid; st->st_gid = in->gid; - if (in->ctime.sec() > in->mtime.sec()) { + if (in->ctime > in->mtime) { stat_set_ctime_sec(st, in->ctime.sec()); stat_set_ctime_nsec(st, in->ctime.nsec()); } else { -- 2.47.3