diff --git a/include/linux/fscache.h b/include/linux/fscache.h
index a4dab599861373b75e4231e66ca9a640680a0a0e..3b2282c157f797de6d3b7a39aced1d61d7526eb9 100644
--- a/include/linux/fscache.h
+++ b/include/linux/fscache.h
@@ -167,7 +167,7 @@ struct fscache_cookie {
 
 static inline bool fscache_cookie_enabled(struct fscache_cookie *cookie)
 {
-	return test_bit(FSCACHE_COOKIE_ENABLED, &cookie->flags);
+	return fscache_cookie_valid(cookie) && test_bit(FSCACHE_COOKIE_ENABLED, &cookie->flags);
 }
 
 /*