projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df0cc57
)
exfat: simplify is_valid_cluster()
author
Christophe Vu-Brugier
<christophe.vu-brugier@seagate.com>
Tue, 2 Nov 2021 21:23:55 +0000
(22:23 +0100)
committer
Namjae Jeon
<linkinjeon@kernel.org>
Mon, 10 Jan 2022 02:00:00 +0000
(11:00 +0900)
Simplify is_valid_cluster().
Signed-off-by: Christophe Vu-Brugier <christophe.vu-brugier@seagate.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/exfat/fatent.c
patch
|
blob
|
history
diff --git
a/fs/exfat/fatent.c
b/fs/exfat/fatent.c
index e949e563443c937bc80b13b6cd502a0e0a32c68d..a3464e56a7e167805494ff4dbbe557899c8352b7 100644
(file)
--- a/
fs/exfat/fatent.c
+++ b/
fs/exfat/fatent.c
@@
-84,9
+84,7
@@
int exfat_ent_set(struct super_block *sb, unsigned int loc,
static inline bool is_valid_cluster(struct exfat_sb_info *sbi,
unsigned int clus)
{
- if (clus < EXFAT_FIRST_CLUSTER || sbi->num_clusters <= clus)
- return false;
- return true;
+ return clus >= EXFAT_FIRST_CLUSTER && clus < sbi->num_clusters;
}
int exfat_ent_get(struct super_block *sb, unsigned int loc,