Compare changes

Choose any two refs to compare.

+6 -1
+6 -1
include/linux/closure.h
··· 172 172 bool closure_wait(struct closure_waitlist *list, struct closure *cl); 173 173 void __closure_sync(struct closure *cl); 174 174 175 + static inline unsigned closure_nr_remaining(struct closure *cl) 176 + { 177 + return atomic_read(&cl->remaining) & CLOSURE_REMAINING_MASK; 178 + } 179 + 175 180 /** 176 181 * closure_sync - sleep until a closure a closure has nothing left to wait on 177 182 * ··· 180 185 */ 181 186 static inline void closure_sync(struct closure *cl) 182 187 { 183 - if ((atomic_read(&cl->remaining) & CLOSURE_REMAINING_MASK) != 1) 188 + if (closure_nr_remaining(cl) != 1) 184 189 __closure_sync(cl); 185 190 } 186 191