Skip to contentSkip to conversation

fat-fix-fat_ra_init-for-data-clusters-==-0.patch removed from -mm tree

merged [email protected] 1 participant 1 message Aug 12, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled

     Subject: fat: fix fat_ra_init() for data clusters == 0
has been removed from the -mm tree.  Its filename was
     fat-fix-fat_ra_init-for-data-clusters-==-0.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: OGAWA Hirofumi <[email protected]>
Subject: fat: fix fat_ra_init() for data clusters == 0

If data clusters == 0, fat_ra_init() calls the ->ent_blocknr() for the cluster beyond ->max_clusters.

This checks the limit before initialization to suppress the warning.

---

 fs/fat/fatent.c |    3 +++
 1 file changed, 3 insertions(+)
fs/fat/fatent.c renamed from fs/fat/fatent.c~fat-fix-fat_ra_init-for-data-clusters-==-0 +3 -0
@@ -657,6 +657,9 @@ static void fat_ra_init(struct super_blo
 	unsigned long ra_pages = sb->s_bdi->ra_pages;
 	unsigned int reada_blocks;
 
+	if (fatent->entry >= ent_limit)
+		return;
+
 	if (ra_pages > sb->s_bdi->io_pages)
 		ra_pages = rounddown(ra_pages, sb->s_bdi->io_pages);
 	reada_blocks = ra_pages << (PAGE_SHIFT - sb->s_blocksize_bits + 1);

_

Patches currently in -mm which might be from [email protected] are