add patch improve-code-readability-in-ext4_iget
[ext4-patch-queue.git] / jbd2-replace-current_kernel-time64-with-ktime-equivalent
blob397930a29ec419b026274a9665c8c4df6f4feb4e
1 jbd2: replace current_kernel_time64 with ktime equivalent
3 From: Arnd Bergmann <arnd@arndb.de>
5 jbd2 is one of the few callers of current_kernel_time64(), which
6 is a wrapper around ktime_get_coarse_real_ts64(). This calls the
7 latter directly for consistency with the rest of the kernel that
8 is moving to the ktime_get_ family of time accessors.
10 Reviewed-by: Andreas Dilger <adilger@dilger.ca>
11 Reviewed-by: Jan Kara <jack@suse.cz>
12 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
13 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 ---
15  fs/jbd2/commit.c | 3 ++-
16  1 file changed, 2 insertions(+), 1 deletion(-)
18 diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
19 index 8de0e7723316..150cc030b4d7 100644
20 --- a/fs/jbd2/commit.c
21 +++ b/fs/jbd2/commit.c
22 @@ -121,7 +121,7 @@ static int journal_submit_commit_record(journal_t *journal,
23         struct commit_header *tmp;
24         struct buffer_head *bh;
25         int ret;
26 -       struct timespec64 now = current_kernel_time64();
27 +       struct timespec64 now;
29         *cbh = NULL;
31 @@ -134,6 +134,7 @@ static int journal_submit_commit_record(journal_t *journal,
32                 return 1;
34         tmp = (struct commit_header *)bh->b_data;
35 +       ktime_get_coarse_real_ts64(&now);
36         tmp->h_commit_sec = cpu_to_be64(now.tv_sec);
37         tmp->h_commit_nsec = cpu_to_be32(now.tv_nsec);
39 -- 
40 2.9.0