Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1324950

[PATCH 07/10] fs: ext4: Replace CURRENT_TIME with ext4_current_time()

From Deepa Dinamani <deepa.kernel@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 07/10] fs: ext4: Replace CURRENT_TIME with ext4_current_time()
Date 2016-02-03 07:20 +0100
Message-ID <qXYXg-6CP-23@gated-at.bofh.it> (permalink)
References <qXYXg-6CP-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <deepa.kernel@gmail.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: linux-ext4@vger.kernel.org
---
 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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/10] Remove CURRENT_TIME and CURRENT_TIME_SEC - PART 1 Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 07:20 +0100
  [PATCH 07/10] fs: ext4: Replace CURRENT_TIME with ext4_current_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 07:20 +0100
  [PATCH 01/10] fs: Add current_fs_time_sec() function Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 07:20 +0100
  [PATCH 02/10] vfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 07:20 +0100
  [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 07:20 +0100
    Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() "Yan, Zheng" <ukernel@gmail.com> - 2016-02-03 15:40 +0100
      Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by  ktime_get_real_ts() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 17:20 +0100
        Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Arnd Bergmann <arnd@arndb.de> - 2016-02-03 22:30 +0100
          Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() "Yan, Zheng" <zyan@redhat.com> - 2016-02-04 03:10 +0100
            Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Arnd Bergmann <arnd@arndb.de> - 2016-02-04 09:40 +0100
              Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Ilya Dryomov <idryomov@gmail.com> - 2016-02-04 10:10 +0100
                Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Arnd Bergmann <arnd@arndb.de> - 2016-02-04 14:40 +0100
                Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Gregory Farnum <gfarnum@redhat.com> - 2016-02-04 16:30 +0100
                Re: [Y2038] [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Arnd Bergmann <arnd@arndb.de> - 2016-02-04 22:10 +0100
  [PATCH 08/10] fs: ceph: replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 07:20 +0100
    Re: [PATCH 08/10] fs: ceph: replace CURRENT_TIME by current_fs_time() "Yan, Zheng" <zyan@redhat.com> - 2016-02-03 07:30 +0100
  [PATCH 10/10] fs: btrfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 07:20 +0100
    Re: [PATCH 10/10] fs: btrfs: Replace CURRENT_TIME by  current_fs_time() David Sterba <dsterba@suse.cz> - 2016-02-04 15:20 +0100
      Re: [PATCH 10/10] fs: btrfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-05 12:40 +0100
        [PATCH v2 10/10] fs: btrfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-07 09:00 +0100
          Re: [PATCH v2 10/10] fs: btrfs: Replace CURRENT_TIME by  current_fs_time() David Sterba <dsterba@suse.cz> - 2016-02-08 16:10 +0100
  Re: [Y2038] [PATCH 00/10] Remove CURRENT_TIME and CURRENT_TIME_SEC - PART 1 Arnd Bergmann <arnd@arndb.de> - 2016-02-03 22:40 +0100
    Re: [Y2038] [PATCH 00/10] Remove CURRENT_TIME and CURRENT_TIME_SEC -  PART 1 Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-04 06:00 +0100

csiph-web