Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233639
b: refs/heads/master
c: 3c522ce
h: refs/heads/master
i:
  233637: 3089ab0
  233635: 0aef3c8
  233631: 55df1d4
v: v3
  • Loading branch information
Miklos Szeredi authored and Linus Torvalds committed Feb 24, 2011
1 parent 07d43ea commit af51f25
Show file tree
Hide file tree
Showing 2 changed files with 6 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: dcace5ac85c628af21878a1fa151e5e6403fb8eb
refs/heads/master: 3c522cedb572bb8d2e4867f358bdaa7d0c53d88c
8 changes: 5 additions & 3 deletions trunk/block/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,11 @@ int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
return -EINVAL;
if (get_user(n, (int __user *) arg))
return -EFAULT;
if (!(mode & FMODE_EXCL) &&
blkdev_get(bdev, mode | FMODE_EXCL, &bdev) < 0)
return -EBUSY;
if (!(mode & FMODE_EXCL)) {
bdgrab(bdev);
if (blkdev_get(bdev, mode | FMODE_EXCL, &bdev) < 0)
return -EBUSY;
}
ret = set_blocksize(bdev, n);
if (!(mode & FMODE_EXCL))
blkdev_put(bdev, mode | FMODE_EXCL);
Expand Down

0 comments on commit af51f25

Please sign in to comment.