summaryrefslogtreecommitdiffstats
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2016-02-02 22:07:48 -0800
committerIlya Dryomov <idryomov@gmail.com>2016-03-25 18:51:52 +0100
commit8bbd47140cf0d3f1cef882cc553778f417087606 (patch)
tree1e6d09f16b56a40012fcb2f6729ad3eef36351d1 /fs/ceph/file.c
parent5b64640cf65be4a029728c390e9b97afce2a493d (diff)
downloadop-kernel-dev-8bbd47140cf0d3f1cef882cc553778f417087606.zip
op-kernel-dev-8bbd47140cf0d3f1cef882cc553778f417087606.tar.gz
ceph: replace CURRENT_TIME by current_fs_time()
CURRENT_TIME macro is not appropriate for filesystems as it doesn't use the right granularity for filesystem timestamps. Use current_fs_time() instead. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r--fs/ceph/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 6738766..389adac 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -782,7 +782,7 @@ ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter,
int num_pages = 0;
int flags;
int ret;
- struct timespec mtime = CURRENT_TIME;
+ struct timespec mtime = current_fs_time(inode->i_sb);
size_t count = iov_iter_count(iter);
loff_t pos = iocb->ki_pos;
bool write = iov_iter_rw(iter) == WRITE;
@@ -986,7 +986,7 @@ ceph_sync_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos,
int flags;
int check_caps = 0;
int ret;
- struct timespec mtime = CURRENT_TIME;
+ struct timespec mtime = current_fs_time(inode->i_sb);
size_t count = iov_iter_count(from);
if (ceph_snap(file_inode(file)) != CEPH_NOSNAP)
OpenPOWER on IntegriCloud