Re: [WTF] ->setattr() locking changes

Linus Torvalds (torvalds@transmeta.com)
Sat, 6 Apr 2002 10:23:10 -0800 (PST)


On Sat, 6 Apr 2002, Alexander Viro wrote:
> >
> > Comments? If you don't see any problems with this variant I'll do it.
>
> OTOH, we might be better off taking ->i_sem in all callers of notify_change().

That was my first reaction on Dave's patch, but on the other hand it then
looked so simple to just let notify_change() do the locking (none of the
places I looked at wanted to do anything else), that it looked better
inside notify_change.

I agree with you that doing the locking outside would clean some stuff up,
since things like write already have the lock for other reasons.

> Hmm... While we are at it, why don't we remove suid/sgid on truncate(2)?

Are there any standards saying either way? But yes, it sounds logical.

Linus

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