# \[PATCH 07/10\] fs: ext4: Replace CURRENT\_TIME with ext4\_current\_time()

- From: Deepa Dinamani \<hidden\>
- Date: 2016-02-03 06:12:00 
- List: linux-ext4
- Page: https://ratatoskr.run/linux-ext4/2016/02/104549
- Thread: https://ratatoskr.run/linux-fsdevel/2016/02/105061/t.md

```text
CURRENT_TIME macro is not appropriate for filesystems as it
doesn't use the right granularity for filesystem timestamps.
Use ext4_current_time() instead which is appropriate for ext4
timestamps.

Signed-off-by: Deepa Dinamani <redacted>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: <redacted>
---
 fs/ext4/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 3ed01ec..5e6c866 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5139,7 +5139,7 @@ static int ext4_quota_off(struct super_block *sb, int type)
 	handle = ext4_journal_start(inode, EXT4_HT_QUOTA, 1);
 	if (IS_ERR(handle))
 		goto out;
-	inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_ctime = ext4_current_time(inode);
 	ext4_mark_inode_dirty(handle, inode);
 	ext4_journal_stop(handle);
 
-- 
1.9.1
```
