]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
exfat: remove the unreachable warning for cache miss cases
authorChi Zhiling <chizhiling@kylinos.cn>
Wed, 14 Jan 2026 12:12:42 +0000 (20:12 +0800)
committerNamjae Jeon <linkinjeon@kernel.org>
Thu, 12 Feb 2026 12:21:49 +0000 (21:21 +0900)
The cache_id remains unchanged on a cache miss; its value is always
exactly what was set by cache_init. Therefore, checking this value
again is meaningless.

Signed-off-by: Chi Zhiling <chizhiling@kylinos.cn>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/exfat/cache.c

index 0ee4bff1cb35be0468ee14a5594b26fd2300e9bb..d51737498ee4678f0005426f7df06048d844faba 100644 (file)
@@ -260,18 +260,7 @@ int exfat_get_cluster(struct inode *inode, unsigned int cluster,
                return 0;
 
        cache_init(&cid, EXFAT_EOF_CLUSTER, EXFAT_EOF_CLUSTER);
-
-       if (exfat_cache_lookup(inode, cluster, &cid, fclus, dclus) ==
-                       EXFAT_EOF_CLUSTER) {
-               /*
-                * dummy, always not contiguous
-                * This is reinitialized by cache_init(), later.
-                */
-               WARN_ON(cid.id != EXFAT_CACHE_VALID ||
-                       cid.fcluster != EXFAT_EOF_CLUSTER ||
-                       cid.dcluster != EXFAT_EOF_CLUSTER ||
-                       cid.nr_contig != 0);
-       }
+       exfat_cache_lookup(inode, cluster, &cid, fclus, dclus);
 
        if (*fclus == cluster)
                return 0;