Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54551
b: refs/heads/master
c: e7d709c
h: refs/heads/master
i:
  54549: 31b9a57
  54547: bd9b686
  54543: 38b8a2c
v: v3
  • Loading branch information
Vignesh Babu BM authored and Linus Torvalds committed May 8, 2007
1 parent 552ce72 commit d582bf9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4fa156ea846daae44d60b05ea066d0e28fd3b6c4
refs/heads/master: e7d709c096487078652a1384d7a2d0e4459e18b6
7 changes: 3 additions & 4 deletions trunk/fs/fat/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/parser.h>
#include <linux/uio.h>
#include <linux/writeback.h>
#include <linux/log2.h>
#include <asm/unaligned.h>

#ifndef CONFIG_FAT_DEFAULT_IOCHARSET
Expand Down Expand Up @@ -1217,8 +1218,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
}
logical_sector_size =
le16_to_cpu(get_unaligned((__le16 *)&b->sector_size));
if (!logical_sector_size
|| (logical_sector_size & (logical_sector_size - 1))
if (!is_power_of_2(logical_sector_size)
|| (logical_sector_size < 512)
|| (PAGE_CACHE_SIZE < logical_sector_size)) {
if (!silent)
Expand All @@ -1228,8 +1228,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
goto out_invalid;
}
sbi->sec_per_clus = b->sec_per_clus;
if (!sbi->sec_per_clus
|| (sbi->sec_per_clus & (sbi->sec_per_clus - 1))) {
if (!is_power_of_2(sbi->sec_per_clus)) {
if (!silent)
printk(KERN_ERR "FAT: bogus sectors per cluster %u\n",
sbi->sec_per_clus);
Expand Down

0 comments on commit d582bf9

Please sign in to comment.