From 2189850f42beff23af32d847bd043cd1d1811a80 Mon Sep 17 00:00:00 2001 From: Evgeniy Dushistov Date: Fri, 16 Mar 2007 13:38:07 -0800 Subject: [PATCH] ufs2: more correct work with time This patch corrects work with time in UFS2 case. 1) According to UFS2 disk layout modification/access and so on "time" should be hold in two variables one 64bit for seconds and another 32bit for nanoseconds, at now for some unknown reason we suppose that "inode time" holds in three variables 32bit for seconds, 32bit for milliseconds and 32bit for nanoseconds. 2) We set amount of nanoseconds in "VFS inode" to 0 during read, instead of getting values from "on disk inode"(this should close http://bugzilla.kernel.org/show_bug.cgi?id=7991). Signed-off-by: Evgeniy Dushistov Cc: Bjoern Jacke Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/ufs/ialloc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'fs/ufs/ialloc.c') diff --git a/fs/ufs/ialloc.c b/fs/ufs/ialloc.c index b868878009b..c28a8b6f2fe 100644 --- a/fs/ufs/ialloc.c +++ b/fs/ufs/ialloc.c @@ -343,9 +343,8 @@ cg_found: lock_buffer(bh); ufs2_inode = (struct ufs2_inode *)bh->b_data; ufs2_inode += ufs_inotofsbo(inode->i_ino); - ufs2_inode->ui_birthtime.tv_sec = - cpu_to_fs32(sb, CURRENT_TIME_SEC.tv_sec); - ufs2_inode->ui_birthtime.tv_usec = 0; + ufs2_inode->ui_birthtime = cpu_to_fs64(sb, CURRENT_TIME.tv_sec); + ufs2_inode->ui_birthnsec = cpu_to_fs32(sb, CURRENT_TIME.tv_nsec); mark_buffer_dirty(bh); unlock_buffer(bh); if (sb->s_flags & MS_SYNCHRONOUS) -- cgit v1.2.3