public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.5.8-pre3 & ext3: cannot chown
@ 2002-04-11  6:59 Duncan Sands
  2002-04-11  7:19 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Duncan Sands @ 2002-04-11  6:59 UTC (permalink / raw)
  To: linux-kernel

The subject just about says it all.  After 12 hours
of uptime running 2.5.8-pre3 on an ext3 partition,
I noticed that changing the owner of a file had no
effect.  Rebooting with 2.4.18, there was no problem
in using chown.

All the best,

Duncan.

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

* Re: 2.5.8-pre3 & ext3: cannot chown
  2002-04-11  6:59 2.5.8-pre3 & ext3: cannot chown Duncan Sands
@ 2002-04-11  7:19 ` Andrew Morton
  2002-04-11 14:29   ` Alexander Viro
  2002-04-11 18:53   ` Duncan Sands
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Morton @ 2002-04-11  7:19 UTC (permalink / raw)
  To: Duncan Sands; +Cc: linux-kernel, Alexander Viro

Duncan Sands wrote:
> 
> The subject just about says it all.  After 12 hours
> of uptime running 2.5.8-pre3 on an ext3 partition,
> I noticed that changing the owner of a file had no
> effect.  Rebooting with 2.4.18, there was no problem
> in using chown.

How does this look?

--- linux-2.5.8-pre3/fs/open.c	Tue Apr  9 18:16:40 2002
+++ 25/fs/open.c	Thu Apr 11 00:15:09 2002
@@ -524,11 +524,11 @@ static int chown_common(struct dentry * 
 		goto out;
 	newattrs.ia_valid =  ATTR_CTIME;
 	if (user != (uid_t) -1) {
-		newattrs.ia_valid =  ATTR_UID;
+		newattrs.ia_valid |= ATTR_UID;
 		newattrs.ia_uid = user;
 	}
 	if (group != (gid_t) -1) {
-		newattrs.ia_valid =  ATTR_GID;
+		newattrs.ia_valid |= ATTR_GID;
 		newattrs.ia_gid = group;
 	}
 	if (!S_ISDIR(inode->i_mode))

-

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

* Re: 2.5.8-pre3 & ext3: cannot chown
  2002-04-11  7:19 ` Andrew Morton
@ 2002-04-11 14:29   ` Alexander Viro
  2002-04-11 18:53   ` Duncan Sands
  1 sibling, 0 replies; 4+ messages in thread
From: Alexander Viro @ 2002-04-11 14:29 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, linux-kernel



On Thu, 11 Apr 2002, Andrew Morton wrote:

> Duncan Sands wrote:
> > 
> > The subject just about says it all.  After 12 hours
> > of uptime running 2.5.8-pre3 on an ext3 partition,
> > I noticed that changing the owner of a file had no
> > effect.  Rebooting with 2.4.18, there was no problem
> > in using chown.
> 
> How does this look?
> 
> --- linux-2.5.8-pre3/fs/open.c	Tue Apr  9 18:16:40 2002
> +++ 25/fs/open.c	Thu Apr 11 00:15:09 2002
> @@ -524,11 +524,11 @@ static int chown_common(struct dentry * 
>  		goto out;
>  	newattrs.ia_valid =  ATTR_CTIME;
>  	if (user != (uid_t) -1) {
> -		newattrs.ia_valid =  ATTR_UID;
> +		newattrs.ia_valid |= ATTR_UID;
>  		newattrs.ia_uid = user;
>  	}
>  	if (group != (gid_t) -1) {
> -		newattrs.ia_valid =  ATTR_GID;
> +		newattrs.ia_valid |= ATTR_GID;


Good catch.  Linus, please apply.


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

* Re: 2.5.8-pre3 & ext3: cannot chown
  2002-04-11  7:19 ` Andrew Morton
  2002-04-11 14:29   ` Alexander Viro
@ 2002-04-11 18:53   ` Duncan Sands
  1 sibling, 0 replies; 4+ messages in thread
From: Duncan Sands @ 2002-04-11 18:53 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Alexander Viro

On Thursday 11 April 2002 9:19 am, Andrew Morton wrote:
> Duncan Sands wrote:
> > The subject just about says it all.  After 12 hours
> > of uptime running 2.5.8-pre3 on an ext3 partition,
> > I noticed that changing the owner of a file had no
> > effect.  Rebooting with 2.4.18, there was no problem
> > in using chown.
>
> How does this look?

It looks good: with this patch I can now chown and chgrp
as usual.

Thanks for fixing this,

Duncan.

> --- linux-2.5.8-pre3/fs/open.c	Tue Apr  9 18:16:40 2002
> +++ 25/fs/open.c	Thu Apr 11 00:15:09 2002
> @@ -524,11 +524,11 @@ static int chown_common(struct dentry *
>  		goto out;
>  	newattrs.ia_valid =  ATTR_CTIME;
>  	if (user != (uid_t) -1) {
> -		newattrs.ia_valid =  ATTR_UID;
> +		newattrs.ia_valid |= ATTR_UID;
>  		newattrs.ia_uid = user;
>  	}
>  	if (group != (gid_t) -1) {
> -		newattrs.ia_valid =  ATTR_GID;
> +		newattrs.ia_valid |= ATTR_GID;
>  		newattrs.ia_gid = group;
>  	}
>  	if (!S_ISDIR(inode->i_mode))
>
> -

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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-11  6:59 2.5.8-pre3 & ext3: cannot chown Duncan Sands
2002-04-11  7:19 ` Andrew Morton
2002-04-11 14:29   ` Alexander Viro
2002-04-11 18:53   ` Duncan Sands

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