Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146361
b: refs/heads/master
c: f7c4395
h: refs/heads/master
i:
  146359: bc216a1
v: v3
  • Loading branch information
Theodore Ts'o committed Apr 25, 2009
1 parent a8526e3 commit 3f2399e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 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: c5ca7c7636fa689a9746b6032f83aa7fffec31c6
refs/heads/master: f7c439504ccba0cca43271e651013ab97a221c62
5 changes: 2 additions & 3 deletions trunk/fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,7 @@ static int parse_options(char *options, struct super_block *sb,
return 0;
if (option < 0 || option > (1 << 30))
return 0;
if (option & (option - 1)) {
if (!is_power_of_2(option)) {
printk(KERN_ERR "EXT4-fs: inode_readahead_blks"
" must be a power of 2\n");
return 0;
Expand Down Expand Up @@ -2101,8 +2101,7 @@ static ssize_t inode_readahead_blks_store(struct ext4_attr *a,
if (parse_strtoul(buf, 0x40000000, &t))
return -EINVAL;

/* inode_readahead_blks must be a power of 2 */
if (t & (t-1))
if (!is_power_of_2(t))
return -EINVAL;

sbi->s_inode_readahead_blks = t;
Expand Down

0 comments on commit 3f2399e

Please sign in to comment.