Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH 2/4] fscache: Fix race in fscache_op_complete() due to split atomic_sub & read | Date | Mon, 26 Nov 2018 16:26:36 +0000 |
| |
Andrea Parri <andrea.parri@amarulasolutions.com> wrote:
> > > > Fix this by using atomic_sub_return() instead of two calls. > > > > > > Seems a case for atomic_sub_return_relaxed()... why not? > > > > Ummm... In that case, should it be atomic_sub_return_release()? > > Hard to tell for me: your diff./changelog is all I know about fs-cache > ... (and this suggests -no-, given that atomic_sub() and atomic_read() > provide no ordering...); good question though. ;-)
Yeah, that doesn't mean that it shouldn't be stricter than 'relaxed'. It's kind of like an unlock/release operation, so I think 'release' is probably the minimum requirement.
David
| |