diff options
-rw-r--r-- | block/ioctl.c | 4 |
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: { |