Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54553
b: refs/heads/master
c: 1368c4f
h: refs/heads/master
i:
  54551: d582bf9
v: v3
  • Loading branch information
Vignesh Babu BM authored and Linus Torvalds committed May 8, 2007
1 parent 27f741f commit e4d01ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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: e1b5c1d3da05c91129120d045dfcdfc7761f44f1
refs/heads/master: 1368c4f2482c9e06bcb297217433818b171cc9e3
3 changes: 2 additions & 1 deletion trunk/fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/mount.h>
#include <linux/uio.h>
#include <linux/namei.h>
#include <linux/log2.h>
#include <asm/uaccess.h>
#include "internal.h"

Expand Down Expand Up @@ -67,7 +68,7 @@ static void kill_bdev(struct block_device *bdev)
int set_blocksize(struct block_device *bdev, int size)
{
/* Size must be a power of two, and between 512 and PAGE_SIZE */
if (size > PAGE_SIZE || size < 512 || (size & (size-1)))
if (size > PAGE_SIZE || size < 512 || !is_power_of_2(size))
return -EINVAL;

/* Size cannot be smaller than the size supported by the device */
Expand Down

0 comments on commit e4d01ea

Please sign in to comment.