Skip to content

Commit

Permalink
fs: ceph: Delete timespec64_trunc() usage
Browse files Browse the repository at this point in the history
Since ceph always uses ns granularity, skip the
truncation which is a no-op.

Signed-off-by: Deepa Dinamani <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
deepa-hub authored and Al Viro committed Dec 9, 2019
1 parent 918c900 commit 668c9a6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/ceph/mds_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,6 @@ struct ceph_mds_request *
ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode)
{
struct ceph_mds_request *req = kzalloc(sizeof(*req), GFP_NOFS);
struct timespec64 ts;

if (!req)
return ERR_PTR(-ENOMEM);
Expand All @@ -2088,8 +2087,7 @@ ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode)
init_completion(&req->r_safe_completion);
INIT_LIST_HEAD(&req->r_unsafe_item);

ktime_get_coarse_real_ts64(&ts);
req->r_stamp = timespec64_trunc(ts, mdsc->fsc->sb->s_time_gran);
ktime_get_coarse_real_ts64(&req->r_stamp);

req->r_op = op;
req->r_direct_mode = mode;
Expand Down

0 comments on commit 668c9a6

Please sign in to comment.