public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix devfs compile problems was Re: Linux v2.5.48
       [not found] ` <66aa.3dd8ae09.31d44@gzp1.gzp.hu.suse.lists.linux.kernel>
@ 2002-11-18 12:43   ` Andi Kleen
  0 siblings, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2002-11-18 12:43 UTC (permalink / raw)
  To: Gabor Z. Papp; +Cc: linux-kernel, torvalds

"Gabor Z. Papp" <gzp@myhost.mynet> writes:


> fs/devfs/base.c:3033: incompatible types in assignment
> fs/devfs/base.c:3034: incompatible types in assignment
> fs/devfs/base.c: In function `devfs_mkdir':
> fs/devfs/base.c:3063: incompatible types in assignment
> fs/devfs/base.c:3064: incompatible types in assignment
> fs/devfs/base.c:3065: incompatible types in assignment
> fs/devfs/base.c: In function `devfs_mknod':
> fs/devfs/base.c:3132: incompatible types in assignment
> fs/devfs/base.c:3133: incompatible types in assignment
> fs/devfs/base.c:3134: incompatible types in assignment

Side effect from the nsec stat patch. 
Here is a patch:

Linus, please consider applying.

-Andi

--- linux-2.5.48-work/fs/devfs/base.c-o	2002-11-18 13:39:07.000000000 +0100
+++ linux-2.5.48-work/fs/devfs/base.c	2002-11-18 13:41:12.000000000 +0100
@@ -3029,9 +3029,9 @@
     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.atime = get_seconds();
+    de->inode.mtime = get_seconds();
+    de->inode.ctime = 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 +3060,9 @@
 	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.atime = get_seconds();
+    de->inode.mtime = get_seconds();
+    de->inode.ctime = 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 +3129,9 @@
 	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.atime = get_seconds();
+    de->inode.mtime = get_seconds();
+    de->inode.ctime = 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",



-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix devfs compile problems was Re: Linux v2.5.48
@ 2002-11-19  0:07 Adam J. Richter
  2002-11-19  0:20 ` Andi Kleen
  0 siblings, 1 reply; 4+ messages in thread
From: Adam J. Richter @ 2002-11-19  0:07 UTC (permalink / raw)
  To: ak, gzp, linux-kernel, torvalds

Hi Linus,

	I'd like to recommend that you apply this to fix
fs/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
adam@yggdrasil.com     \ /                  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."

--- linux-2.5.48/fs/devfs/base.c	2002-11-17 20:29:26.000000000 -0800
+++ linux/fs/devfs/base.c	2002-11-18 16:04:13.000000000 -0800
@@ -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",

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix devfs compile problems was Re: Linux v2.5.48
  2002-11-19  0:07 Adam J. Richter
@ 2002-11-19  0:20 ` Andi Kleen
  2002-11-19  1:13   ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2002-11-19  0:20 UTC (permalink / raw)
  To: Adam J. Richter; +Cc: ak, gzp, linux-kernel, torvalds

On Mon, Nov 18, 2002 at 04:07:17PM -0800, Adam J. Richter wrote:
> Hi Linus,
> 
> 	I'd like to recommend that you apply this to fix
> fs/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?

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix devfs compile problems was Re: Linux v2.5.48
  2002-11-19  0:20 ` Andi Kleen
@ 2002-11-19  1:13   ` Linus Torvalds
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2002-11-19  1:13 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Adam J. Richter, gzp, linux-kernel


On Tue, 19 Nov 2002, Andi Kleen wrote:
> 
> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-11-19  1:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.44.0211172036590.32717-100000@penguin.transmeta.com.suse.lists.linux.kernel>
     [not found] ` <66aa.3dd8ae09.31d44@gzp1.gzp.hu.suse.lists.linux.kernel>
2002-11-18 12:43   ` [PATCH] fix devfs compile problems was Re: Linux v2.5.48 Andi Kleen
2002-11-19  0:07 Adam J. Richter
2002-11-19  0:20 ` Andi Kleen
2002-11-19  1:13   ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox