[PATCH 05/21] fs: jfs: Replace CURRENT_TIME_SEC by current_fs_time()

From: Deepa Dinamani
Date: Thu Jun 09 2016 - 01:06:02 EST


jfs uses nanosecond granularity for filesystem timestamps.
Only this assignemt is not using nanosecond granularity.
Use current_fs_time() to get the right nanosecond granularity.

Signed-off-by: Deepa Dinamani <deepa.kernel@xxxxxxxxx>
Cc: Dave Kleikamp <shaggy@xxxxxxxxxx>
Cc: jfs-discussion@xxxxxxxxxxxxxxxxxxxxx
---
fs/jfs/ioctl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/jfs/ioctl.c b/fs/jfs/ioctl.c
index 8653cac..b52aedf 100644
--- a/fs/jfs/ioctl.c
+++ b/fs/jfs/ioctl.c
@@ -60,6 +60,7 @@ long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
struct inode *inode = file_inode(filp);
struct jfs_inode_info *jfs_inode = JFS_IP(inode);
+ struct super_block *sb = inode->i_sb;
unsigned int flags;

switch (cmd) {
@@ -121,7 +122,7 @@ long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)

jfs_set_inode_flags(inode);
inode_unlock(inode);
- inode->i_ctime = CURRENT_TIME_SEC;
+ inode->i_ctime = current_fs_time(sb);
mark_inode_dirty(inode);
setflags_out:
mnt_drop_write_file(filp);
@@ -130,7 +131,6 @@ setflags_out:

case FITRIM:
{
- struct super_block *sb = inode->i_sb;
struct request_queue *q = bdev_get_queue(sb->s_bdev);
struct fstrim_range range;
s64 ret = 0;
--
1.9.1