aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2016-02-03 01:07:48 -0500
committerIlya Dryomov <idryomov@gmail.com>2016-03-25 13:51:52 -0400
commit8bbd47140cf0d3f1cef882cc553778f417087606 (patch)
tree1e6d09f16b56a40012fcb2f6729ad3eef36351d1 /fs/ceph/file.c
parent5b64640cf65be4a029728c390e9b97afce2a493d (diff)
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 6738766f0c12..389adacbc719 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,
782 int num_pages = 0; 782 int num_pages = 0;
783 int flags; 783 int flags;
784 int ret; 784 int ret;
785 struct timespec mtime = CURRENT_TIME; 785 struct timespec mtime = current_fs_time(inode->i_sb);
786 size_t count = iov_iter_count(iter); 786 size_t count = iov_iter_count(iter);
787 loff_t pos = iocb->ki_pos; 787 loff_t pos = iocb->ki_pos;
788 bool write = iov_iter_rw(iter) == WRITE; 788 bool write = iov_iter_rw(iter) == WRITE;
@@ -986,7 +986,7 @@ ceph_sync_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos,
986 int flags; 986 int flags;
987 int check_caps = 0; 987 int check_caps = 0;
988 int ret; 988 int ret;
989 struct timespec mtime = CURRENT_TIME; 989 struct timespec mtime = current_fs_time(inode->i_sb);
990 size_t count = iov_iter_count(from); 990 size_t count = iov_iter_count(from);
991 991
992 if (ceph_snap(file_inode(file)) != CEPH_NOSNAP) 992 if (ceph_snap(file_inode(file)) != CEPH_NOSNAP)