Skip to content

Commit e21a28b

Browse files
cvubrugiernamjaejeon
authored andcommitted
exfat: simplify is_valid_cluster()
Simplify is_valid_cluster(). Signed-off-by: Christophe Vu-Brugier <[email protected]> Signed-off-by: Namjae Jeon <[email protected]>
1 parent df0cc57 commit e21a28b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/exfat/fatent.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ int exfat_ent_set(struct super_block *sb, unsigned int loc,
8484
static inline bool is_valid_cluster(struct exfat_sb_info *sbi,
8585
unsigned int clus)
8686
{
87-
if (clus < EXFAT_FIRST_CLUSTER || sbi->num_clusters <= clus)
88-
return false;
89-
return true;
87+
return clus >= EXFAT_FIRST_CLUSTER && clus < sbi->num_clusters;
9088
}
9189

9290
int exfat_ent_get(struct super_block *sb, unsigned int loc,

0 commit comments

Comments
 (0)