diff options
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 5dde6df..12b22dd 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -445,6 +445,12 @@ long bdev_direct_access(struct block_device *bdev, sector_t sector, long avail; const struct block_device_operations *ops = bdev->bd_disk->fops; + /* + * The device driver is allowed to sleep, in order to make the + * memory directly accessible. + */ + might_sleep(); + if (size < 0) return size; if (!ops->direct_access) |