The spinlock is (now) *not used to protect test-and-set accesses to attributes of the structure or sc_list operations. There is, AFAICT, a distinct lack of {WRITE,READ}_ONCE()s in the handling of channel->state, but the changes below do not seem to make things "worse". ;-)
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -840,12 +840,6 @@ struct vmbus_channel { · 839 unmodified lines | ||
| 840 | 840 | */ |
| 841 | 841 | void (*chn_rescind_callback)(struct vmbus_channel *channel); |
| 842 | 842 | |
| 843 | − /* | |
| 844 | − * The spinlock to protect the structure. It is being used to protect | |
| 845 | − * test-and-set access to various attributes of the structure as well | |
| 846 | − * as all sc_list operations. | |
| 847 | − */ | |
| 848 | − spinlock_t lock; | |
| 849 | 843 | /* |
| 850 | 844 | * All Sub-channels of a primary channel are linked here. |
| 851 | 845 | */ |