File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -372,17 +372,22 @@ static struct fscache_cookie *fscache_alloc_cookie(
372372 return NULL ;
373373}
374374
375+ static inline bool fscache_cookie_is_dropped (struct fscache_cookie * cookie )
376+ {
377+ return READ_ONCE (cookie -> state ) == FSCACHE_COOKIE_STATE_DROPPED ;
378+ }
379+
375380static void fscache_wait_on_collision (struct fscache_cookie * candidate ,
376381 struct fscache_cookie * wait_for )
377382{
378383 enum fscache_cookie_state * statep = & wait_for -> state ;
379384
380- wait_var_event_timeout (statep , READ_ONCE ( * statep ) == FSCACHE_COOKIE_STATE_DROPPED ,
385+ wait_var_event_timeout (statep , fscache_cookie_is_dropped ( wait_for ) ,
381386 20 * HZ );
382- if (READ_ONCE ( * statep ) != FSCACHE_COOKIE_STATE_DROPPED ) {
387+ if (! fscache_cookie_is_dropped ( wait_for ) ) {
383388 pr_notice ("Potential collision c=%08x old: c=%08x" ,
384389 candidate -> debug_id , wait_for -> debug_id );
385- wait_var_event (statep , READ_ONCE ( * statep ) == FSCACHE_COOKIE_STATE_DROPPED );
390+ wait_var_event (statep , fscache_cookie_is_dropped ( wait_for ) );
386391 }
387392}
388393
You can’t perform that action at this time.
0 commit comments