fix devfs compile problems was Re: Linux v2.5.48
Hi Linus,
I'd like to recommend that you apply this to fixfs/devfs/base.c compilation problems instead of Andi's patch, as this one ensures that {a,m,c}time will all have the same value even if successive calls to get_seconds() might someday be able to return different values. Do you concur, Andi?
Adam J. Richter __ ______________ 575 Oroville Road [email protected] \ / Milpitas, California 95035 +1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."
fs/devfs/base.c +3 -9
@@ -3029,9 +3029,7 @@ de->vfs_deletable = TRUE; de->inode.uid = current->euid; de->inode.gid = current->egid; - de->inode.atime =CURRENT_TIME ; - de->inode.mtime =CURRENT_TIME ; - de->inode.ctime =CURRENT_TIME ; + de->inode.ctime = de->inode.mtime = de->inode.atime =get_seconds ();if ( ( inode =_devfs_get_vfs_inode (dir->i_sb, de, dentry) ) ==NULL )return -ENOMEM ; DPRINTK (DEBUG_DISABLED, "(%s): new VFS inode(%u): %p dentry: %p\n",
@@ -3060,9 +3058,7 @@return err; de->inode.uid = current->euid; de->inode.gid = current->egid; - de->inode.atime =CURRENT_TIME ; - de->inode.mtime =CURRENT_TIME ; - de->inode.ctime =CURRENT_TIME ; + de->inode.ctime = de->inode.mtime = de->inode.atime =get_seconds ();if ( ( inode =_devfs_get_vfs_inode (dir->i_sb, de, dentry) ) ==NULL )return -ENOMEM ; DPRINTK (DEBUG_DISABLED, "(%s): new VFS inode(%u): %p dentry: %p\n",
@@ -3129,9 +3125,7 @@return err; de->inode.uid = current->euid; de->inode.gid = current->egid; - de->inode.atime =CURRENT_TIME ; - de->inode.mtime =CURRENT_TIME ; - de->inode.ctime =CURRENT_TIME ; + de->inode.ctime = de->inode.mtime = de->inode.atime =get_seconds ();if ( ( inode =_devfs_get_vfs_inode (dir->i_sb, de, dentry) ) ==NULL )return -ENOMEM ; DPRINTK (DEBUG_I_MKNOD, ": new VFS inode(%u): %p dentry: %p\n",
Quoted 7 lines · Adam J. Richter
Hi Linus,
I'd like to recommend that you apply this to fix
fs/devfs/base.ccompilation problems instead of Andi's patch, as this one ensures that {a,m,c}time will all have the same value even if successive calls toget_seconds()might someday be able to return different values. Do you concur, Andi?
If you want to make it 100% correct change the de->inode.[mac]time to struct timespec. If you just want it working the first patch is probably fine.
-Andi
Quoted 4 lines · Andi Kleen
If you want to make it 100% correct change the de->inode.[mac]time to struct timespec. If you just want it working the first patch is probably fine.
My BK tree already does the timespec thing, see bkbits.net (or the upcoming nightly snapshots)
Linus