f2fs uses unsigned 40-bit seconds for inode timestamps, which will work
basically forever, but the VFS uses struct timespec for timestamps,
which is only good until 2038 on 32-bit CPUs.

This gets us one small step closer to lifting the VFS limit by using
struct inode_time in f2fs.

Signed-off-by: Arnd Bergmann <a...@arndb.de>
Cc: Jaegeuk Kim <jaegeuk....@samsung.com>
Cc: linux-f2fs-de...@lists.sourceforge.net
---
 fs/f2fs/file.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 37d0e1f..6ff6e5b 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -474,13 +474,13 @@ static void __setattr_copy(struct inode *inode, const 
struct iattr *attr)
        if (ia_valid & ATTR_GID)
                inode->i_gid = attr->ia_gid;
        if (ia_valid & ATTR_ATIME)
-               inode->i_atime = timespec_trunc(attr->ia_atime,
+               inode->i_atime = inode_time_trunc(attr->ia_atime,
                                                inode->i_sb->s_time_gran);
        if (ia_valid & ATTR_MTIME)
-               inode->i_mtime = timespec_trunc(attr->ia_mtime,
+               inode->i_mtime = inode_time_trunc(attr->ia_mtime,
                                                inode->i_sb->s_time_gran);
        if (ia_valid & ATTR_CTIME)
-               inode->i_ctime = timespec_trunc(attr->ia_ctime,
+               inode->i_ctime = inode_time_trunc(attr->ia_ctime,
                                                inode->i_sb->s_time_gran);
        if (ia_valid & ATTR_MODE) {
                umode_t mode = attr->ia_mode;
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to