Re: [patch] remove BKL from inode_setattr

Hugh Dickins
2002-10-14T06:02:46Z

On Sun, 13 Oct 2002, Andrew Morton wrote:
>
> Since April 05 of this year we've been holding the BKL across the
> vmtruncate call out of inode_setattr(). By accident it seems.

But until then, the lock_kernel was one level up in notify_change().

> This does not affect unlink(). It affects ftruncate() and open(O_TRUNC).

And the patch you give affects chown, chgrp, chmod, utime also:
removing a synchronization point if nothing more. Could that matter?

> Given that the drop_inode() path does not take the BKL, I would
> suggest that it is safe to assume that the various filesystem's
> truncate code is safe without this additional VFS-level lock_kernel(),
> and that it can be simply removed.

Isn't doing it when the references have gone rather easier/safer
than when they remain? I'm not sure your argument holds.

> Sound sane?

Of course I want you to be right! But I don't see that you've made
a strong enough case yet. Please show I'm being stupid, someone.

Hugh