Linus Torvalds writes: (Summary) wrote:
That really shouldn't need an exclusive lock either. The whole point is that you're just reading the file, so a shared lock should be fine. There may be other *higher* level reasons why the caller then might want an exclusive lock for other reasons, but that should have nothing to do with the reading part.
to do with the reading part.
So this is the thing I want explained. Right now there are no explanations, and the few comments there are about exclusive locking don't make sense, and don't match the lockdep tests.
[...]
file hash is being calculated.That really shouldn't need an exclusive lock either. The whole point is that you're just reading the file, so a shared lock should be fine. There may be other *higher* level reasons why the caller then might want an exclusive lock for other reasons, but that should have nothing to do with the reading part.
to do with the reading part.
So this is the thing I want explained. Right now there are no explanations, and the few comments there are about exclusive locking don't make sense, and don't match the lockdep tests.