Skip to content

afs: fix the usage of read_seqbegin_or_lock()

Oleg Nesterov lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3afs: fix the usage of read_seqbegin_or_lock() in afs_lookup_volume_rcu()fs/afs/callback.c+2 -10 replies
2/3afs: fix the usage of read_seqbegin_or_lock() in afs_find_server*()fs/afs/server.c+4 -30 replies
3/3afs: use read_seqbegin() in afs_check_validity() and afs_getattr()fs/afs/inode.c+6 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] afs: fix the usage of read_seqbegin_or_lock()

Hello,

Every usage of read_seqbegin_or_lock() in fs/afs is wrong, the counter is always even so read_seqbegin_or_lock() can never take the lock.

The users should either make it odd on the 2nd pass, or use read_seqbegin() instead.

Oleg.
---

 fs/afs/callback.c |  3 ++-
 fs/afs/inode.c    | 15 ++++++---------
 fs/afs/server.c   |  7 ++++---
 3 files changed, 12 insertions(+), 13 deletions(-)