aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-07-07 10:51:27 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 12:26:08 -0400
commit6de43703108bb1d3fc9495b3e8107d6ec72f97e4 (patch)
tree86a5e955f33b0478b61631d373ca01ecf1558bc6 /block
parent62c2a7d969f30163f733c81158254b3095b23e72 (diff)
block: remove BKL from BLKROSET and BLKFLSBUF
We only call the functions set_device_ro(), invalidate_bdev(), sync_filesystem() and sync_blockdev() while holding the BKL in these commands. All of these are also done in other code paths without the BKL, which leads me to the conclusion that the BKL is not needed here either. The reason we hold it here is that it was originally pushed down into the ioctl function from vfs_ioctl. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block')
-rw-r--r--block/ioctl.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/block/ioctl.c b/block/ioctl.c
index 9d91e830b320..60f477c91eef 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -197,10 +197,8 @@ int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
197 if (ret != -EINVAL && ret != -ENOTTY) 197 if (ret != -EINVAL && ret != -ENOTTY)
198 return ret; 198 return ret;
199 199
200 lock_kernel();
201 fsync_bdev(bdev); 200 fsync_bdev(bdev);
202 invalidate_bdev(bdev); 201 invalidate_bdev(bdev);
203 unlock_kernel();
204 return 0; 202 return 0;
205 203
206 case BLKROSET: 204 case BLKROSET:
@@ -212,9 +210,7 @@ int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
212 return -EACCES; 210 return -EACCES;
213 if (get_user(n, (int __user *)(arg))) 211 if (get_user(n, (int __user *)(arg)))
214 return -EFAULT; 212 return -EFAULT;
215 lock_kernel();
216 set_device_ro(bdev, n); 213 set_device_ro(bdev, n);
217 unlock_kernel();
218 return 0; 214 return 0;
219 215
220 case BLKDISCARD: { 216 case BLKDISCARD: {