diff options
author | Deepa Dinamani <deepa.kernel@gmail.com> | 2016-02-06 23:57:21 -0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-02-18 11:46:03 +0100 |
commit | 04b285f35e2086b69682c7ed054aa35eebea9f72 (patch) | |
tree | 72120ea015c4234a1a2533184ac23b925a36a086 /fs/btrfs/file.c | |
parent | 8f682f6955b94ddfb548a1db23c1dd633d90f7de (diff) | |
download | blackbird-op-linux-04b285f35e2086b69682c7ed054aa35eebea9f72.tar.gz blackbird-op-linux-04b285f35e2086b69682c7ed054aa35eebea9f72.zip |
btrfs: 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>
Cc: Chris Mason <clm@fb.com>
Cc: Josef Bacik <jbacik@fb.com>
Cc: linux-btrfs@vger.kernel.org
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 098bb8f690c9..610f56992464 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -2544,7 +2544,7 @@ out_trans: goto out_free; inode_inc_iversion(inode); - inode->i_mtime = inode->i_ctime = CURRENT_TIME; + inode->i_mtime = inode->i_ctime = current_fs_time(inode->i_sb); trans->block_rsv = &root->fs_info->trans_block_rsv; ret = btrfs_update_inode(trans, root, inode); @@ -2794,7 +2794,7 @@ static long btrfs_fallocate(struct file *file, int mode, if (IS_ERR(trans)) { ret = PTR_ERR(trans); } else { - inode->i_ctime = CURRENT_TIME; + inode->i_ctime = current_fs_time(inode->i_sb); i_size_write(inode, actual_end); btrfs_ordered_update_i_size(inode, actual_end, NULL); ret = btrfs_update_inode(trans, root, inode); |