On Fri, Aug 01, 2008 at 12:14:17PM +1000, Neil Brown wrote:
> It sounds to me like the core problem here is that the locking regime
> imposed by the VFS simply isn't suitable for JFFS2 .. and a bunch of
> other filesystems.
> This seems to suggest that the VFS should be changed.
> Superficially, it seems that changing the locking rules so that the
> callee takes i_mutex rather than the caller taking it would help and,
> in the case of JFFS2, make f->sem redundant. Does that match your
Huh? How could that possibly help? You are not changing the sequence
of operations on locks, you only slightly modify the timing; how could
that possibly eliminate a deadlock? Moreover, how the _hell_ could
making exclusion area smaller make f->sem redundant?