[PATCH][resend][v2] afs: Remove erroneous seq |= 1 in volume lookup loop
David Howells
dhowells at redhat.com
Fri Aug 15 04:28:17 PDT 2025
lirongqing <roy.qing.li at gmail.com> wrote:
> From: Li RongQing <lirongqing at baidu.com>
>
> The `seq |= 1` operation in the volume lookup loop is incorrect because:
> seq is already incremented at start, making it odd in next iteration
> which triggers lock, but The `|= 1` operation causes seq to be even
> and unintended lockless operation
>
> Remove this erroneous operation to maintain proper lock sequencing.
>
> Signed-off-by: Li RongQing <lirongqing at baidu.com>
I think you're probably right. I think possibly this should have Oleg's patch
cited in the Fixes: line:
commit 4121b4337146b64560d1e46ebec77196d9287802
afs: fix the usage of read_seqbegin_or_lock() in afs_lookup_volume_rcu()
rather than mine:
commit 32222f09782f1894fcfc37f6505ca676a6f4d1d6
afs: Apply server breaks to mmap'd files in the call processor
Also, I can't help but feel the changes that Oleg's patch made should probably
be wrapped in a macro in linux/seqlock.h.
Oleg?
David
More information about the linux-afs
mailing list