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(
372
372
return NULL ;
373
373
}
374
374
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
+
375
380
static void fscache_wait_on_collision (struct fscache_cookie * candidate ,
376
381
struct fscache_cookie * wait_for )
377
382
{
378
383
enum fscache_cookie_state * statep = & wait_for -> state ;
379
384
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 ) ,
381
386
20 * HZ );
382
- if (READ_ONCE ( * statep ) != FSCACHE_COOKIE_STATE_DROPPED ) {
387
+ if (! fscache_cookie_is_dropped ( wait_for ) ) {
383
388
pr_notice ("Potential collision c=%08x old: c=%08x" ,
384
389
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 ) );
386
391
}
387
392
}
388
393
You can’t perform that action at this time.
0 commit comments