Lines Matching refs:state
308 * Buffer state bits.
346 unsigned long state;
371 * - maintains clean/dirty state along with lru
1428 BUG_ON(!test_bit(B_WRITING, &b->state));
1431 clear_bit(B_WRITING, &b->state);
1434 wake_up_bit(&b->state, B_WRITING);
1449 if (!test_bit(B_DIRTY, &b->state))
1452 clear_bit(B_DIRTY, &b->state);
1453 wait_on_bit_lock_io(&b->state, B_WRITING, TASK_UNINTERRUPTIBLE);
1489 if (!smp_load_acquire(&b->state)) /* fast case */
1492 wait_on_bit_io(&b->state, B_READING, TASK_UNINTERRUPTIBLE);
1494 wait_on_bit_io(&b->state, B_WRITING, TASK_UNINTERRUPTIBLE);
1502 if (WARN_ON_ONCE(test_bit(B_WRITING, &b->state)))
1504 if (WARN_ON_ONCE(test_bit(B_DIRTY, &b->state)))
1510 unlikely(test_bit(B_READING, &b->state)))
1519 if (WARN_ON_ONCE(test_bit(B_READING, &b->state)))
1685 if (WARN_ON_ONCE(test_bit(B_READING, &b->state)))
1688 if (test_bit(B_DIRTY, &b->state) || test_bit(B_WRITING, &b->state))
1708 if (wc->no_wait && test_bit(B_WRITING, &b->state))
1795 b->state = 0;
1797 b->state = 1 << B_READING;
1802 * We mustn't insert into the cache until the B_READING state
1823 if (nf == NF_GET && unlikely(test_bit_acquire(B_READING, &b->state))) {
1839 BUG_ON(!test_bit(B_READING, &b->state));
1842 clear_bit(B_READING, &b->state);
1845 wake_up_bit(&b->state, B_READING);
1882 if (nf == NF_GET && unlikely(test_bit_acquire(B_READING, &b->state))) {
1911 wait_on_bit_io(&b->state, B_READING, TASK_UNINTERRUPTIBLE);
2017 !test_bit_acquire(B_READING, &b->state) &&
2018 !test_bit(B_WRITING, &b->state) &&
2019 !test_bit(B_DIRTY, &b->state)) {
2046 BUG_ON(test_bit(B_READING, &b->state));
2048 if (!test_and_set_bit(B_DIRTY, &b->state)) {
2094 return test_bit(B_WRITING, &b->state);
2118 BUG_ON(test_bit(B_READING, &b->state));
2123 wait_on_bit_io(&b->state, B_WRITING, TASK_UNINTERRUPTIBLE);
2126 wait_on_bit_io(&b->state, B_WRITING, TASK_UNINTERRUPTIBLE);
2129 if (!test_bit(B_DIRTY, &b->state) && !test_bit(B_WRITING, &b->state))
2204 if (likely(!smp_load_acquire(&b->state))) {
2233 return b->state ? ER_DONT_EVICT : ER_EVICT;
2671 if (test_bit_acquire(B_READING, &b->state) ||
2672 test_bit(B_WRITING, &b->state) ||
2673 test_bit(B_DIRTY, &b->state))