Unverified Commit a5bfa15d authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11474 fs/netfs/fscache_cookie: add missing "n_accesses" check

parents 1727cf56 71354e8a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -741,6 +741,10 @@ static void fscache_cookie_state_machine(struct fscache_cookie *cookie)
			spin_lock(&cookie->lock);
		}
		if (test_bit(FSCACHE_COOKIE_DO_LRU_DISCARD, &cookie->flags)) {
			if (atomic_read(&cookie->n_accesses) != 0)
				/* still being accessed: postpone it */
				break;

			__fscache_set_cookie_state(cookie,
						   FSCACHE_COOKIE_STATE_LRU_DISCARDING);
			wake = true;