[AFS]: Eliminate cmpxchg() usage in vlocation code.
cmpxchg() is not available on every processor so can't be used in generic code. Replace with spinlock protection on the ->state changes, wakeups, and wait loops. Add what appears to be a missing wakeup on transition to AFS_VL_VALID state in afs_vlocation_updater(). Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@ -219,7 +219,7 @@ struct afs_vlocation {
|
||||
struct afs_volume *vols[3]; /* volume access record pointer (index by type) */
|
||||
wait_queue_head_t waitq; /* status change waitqueue */
|
||||
time_t update_at; /* time at which record should be updated */
|
||||
rwlock_t lock; /* access lock */
|
||||
spinlock_t lock; /* access lock */
|
||||
afs_vlocation_state_t state; /* volume location state */
|
||||
unsigned short upd_rej_cnt; /* ENOMEDIUM count during update */
|
||||
unsigned short upd_busy_cnt; /* EBUSY count during update */
|
||||
|
Reference in New Issue
Block a user