Commit 5dc72a51 authored by Chi Zhiling's avatar Chi Zhiling Committed by Namjae Jeon
Browse files

exfat: remove the unreachable warning for cache miss cases



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: default avatarChi Zhiling <chizhiling@kylinos.cn>
Reviewed-by: default avatarYuezhang Mo <Yuezhang.Mo@sony.com>
Signed-off-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
parent 2e21557d
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -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;