Skip to content

Commit 5dc72a5

Browse files
Chi Zhilingnamjaejeon
authored andcommitted
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: Chi Zhiling <chizhiling@kylinos.cn> Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
1 parent 2e21557 commit 5dc72a5

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

fs/exfat/cache.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -260,18 +260,7 @@ int exfat_get_cluster(struct inode *inode, unsigned int cluster,
260260
return 0;
261261

262262
cache_init(&cid, EXFAT_EOF_CLUSTER, EXFAT_EOF_CLUSTER);
263-
264-
if (exfat_cache_lookup(inode, cluster, &cid, fclus, dclus) ==
265-
EXFAT_EOF_CLUSTER) {
266-
/*
267-
* dummy, always not contiguous
268-
* This is reinitialized by cache_init(), later.
269-
*/
270-
WARN_ON(cid.id != EXFAT_CACHE_VALID ||
271-
cid.fcluster != EXFAT_EOF_CLUSTER ||
272-
cid.dcluster != EXFAT_EOF_CLUSTER ||
273-
cid.nr_contig != 0);
274-
}
263+
exfat_cache_lookup(inode, cluster, &cid, fclus, dclus);
275264

276265
if (*fclus == cluster)
277266
return 0;

0 commit comments

Comments
 (0)