Re: [PATCH] Useless inode semaphore locking in 2.4.0-test8

From: Andi Kleen (ak@suse.de)
Date: Fri Sep 15 2000 - 07:09:53 EST


On Fri, Sep 15, 2000 at 02:00:38PM +0200, Eric PAIRE wrote:
> Hi,
>
> In open.c:do_truncate(), the call to notify_change() is protected by
> the inode->i_sem, which seems to me useless, and thus can be removed.
> BTW, I also removed the useless inode pointer and error local variables.

Please don't. You opened race country with writes in most file systemsnow.
In reiserfs it is also needed to lock against tail merging.

Also truncate inode locking is needed to get a halfway reliable loopback
device (unlike the current one)

-Andi

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



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:25 EST