Message ID | 20200831195029.T63Ay%akpm@linux-foundation.org |
---|---|
State | New |
Headers | show |
Series | [alternative-merged] fat-avoid-oops-when-bdi-io_pages==0.patch removed from -mm tree | expand |
--- a/fs/fat/fatent.c~fat-avoid-oops-when-bdi-io_pages==0 +++ a/fs/fat/fatent.c @@ -660,7 +660,7 @@ static void fat_ra_init(struct super_blo if (fatent->entry >= ent_limit) return; - if (ra_pages > sb->s_bdi->io_pages) + if (sb->s_bdi->io_pages && 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);