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


Groups > linux.kernel > #1324944

[PATCH 06/10] fs: ext4: Replace CURRENT_TIME_SEC with current_fs_time_sec()

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Deepa Dinamani <deepa.kernel@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 06/10] fs: ext4: Replace CURRENT_TIME_SEC with current_fs_time_sec()
Date Wed, 03 Feb 2016 07:20:02 +0100
Message-ID <qXYXg-6CP-3@gated-at.bofh.it> (permalink)
References <qXYXg-6CP-5@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2zFc6yVBOW34T/DsRCBTy0m6sqBsZCfs6Kki/OauQ3g=; b=OGlOcXqfnlb1GhQqPnmyif8kRoc6TO259YAAOuYiEkoDgNxIc6LbsKNF3pfPFPurG6 5/00KIYUTsFy9bxnvO9cxkylwAatOSr+QJEodQsXLtGinyJeNv1nj1TC6bShveEl+R+W N6MX6tarnKkewaws0mY3cRH9jDdB8cF4sJFXj56YuOm1UaUI6NILrsCkl3/Cco9HGIZ4 L09KoawvdnD6Lu1Hh41lTXFol5TOYAUm3n9WVQnF6mTkWrZab2SKQS72Ykkw8/OpKPdG ZRFLHqZSOJ90w11l2s8xM+rkCvfGXNzukiOkkP06DckY1+JNUe2xzmxChWaGGChVFEy5 vIvw==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2zFc6yVBOW34T/DsRCBTy0m6sqBsZCfs6Kki/OauQ3g=; b=mMjVZEiVHAiXojlzZTgWNP9tHz/3gzPlfNpkjAtR+4DmYrmuwkFwH9v7v/tJgP5FQi aqVtpzMnJNqqtRgRM7EE5P5eaQMkmoEcKwfaF30jQv6waz0+fQ2MDRFzSbSZisWNCAL6 t0zbtLjPYO4FeF0nRndUgjpuVGddFfh/4z1DzE2sO2RxoX2Bif/EN1iYiIqUQETjJfUX tBBmXRCbFGM9nMkVaA9bTOBc4eEoohD0rbqXM/YA1mlMF/GLrvTA1owh7QGoSTAYxWnN 9s4THGsGYYC0Jf+Ekq0/Zv0HQv+cr0iOZkmOwzmSkZp9+Vv2YGxt9K3W3Bp8J8UTjOVu C87A==
X-Gm-Message-State AG10YOSIuGxYMGlN4Y6NU6bBJh/0ArUBGQNNB/wxQAsZ9mfeNUHbTUndNMWCEFR2U+w0xw==
X-Received by 10.98.75.22 with SMTP id y22mr53865014pfa.147.1454479915800; Tue, 02 Feb 2016 22:11:55 -0800 (PST)
X-Mailer git-send-email 1.9.1
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 31
Organization linux.* mail to news gateway
X-Original-Cc Arnd Bergmann <arnd@arndb.de>, Dave Chinner <david@fromorbit.com>, "Theodore Ts'o" <tytso@mit.edu>, linux-kernel@vger.kernel.org, Andreas Dilger <adilger.kernel@dilger.ca>, linux-ext4@vger.kernel.org
X-Original-Date Tue, 2 Feb 2016 22:07:46 -0800
X-Original-Message-ID <1454479670-8204-7-git-send-email-deepa.kernel@gmail.com>
X-Original-References <1454479670-8204-1-git-send-email-deepa.kernel@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1324944

Show key headers only | View raw


The macro CURRENT_TIME_SEC does not represent filesystem times
correctly as it cannot perform range checks.
current_fs_time_sec() will be extended to include this.

CURRENT_TIME_SEC is also not y2038 safe. current_fs_time_sec()
will be transitioned to use 64 bit time along with vfs in a
separate series.

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/ext4.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 0662b28..8dd04f8 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1489,7 +1489,7 @@ static inline struct ext4_inode_info *EXT4_I(struct inode *inode)
 static inline struct timespec ext4_current_time(struct inode *inode)
 {
 	return (inode->i_sb->s_time_gran < NSEC_PER_SEC) ?
-		current_fs_time(inode->i_sb) : CURRENT_TIME_SEC;
+		current_fs_time(inode->i_sb) : current_fs_time_sec(inode->i_sb);
 }
 
 static inline int ext4_valid_inum(struct super_block *sb, unsigned long ino)
-- 
1.9.1

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


Thread

[PATCH 06/10] fs: ext4: Replace CURRENT_TIME_SEC with current_fs_time_sec() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 07:20 +0100

csiph-web