projects
/
platform
/
kernel
/
linux-rpi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "block: remove __blkdev_driver_ioctl"
[platform/kernel/linux-rpi.git]
/
drivers
/
md
/
bcache
/
request.c
diff --git
a/drivers/md/bcache/request.c
b/drivers/md/bcache/request.c
index
6d1de88
..
f575b2d
100644
(file)
--- a/
drivers/md/bcache/request.c
+++ b/
drivers/md/bcache/request.c
@@
-1107,6
+1107,12
@@
static void detached_dev_do_request(struct bcache_device *d, struct bio *bio,
* which would call closure_get(&dc->disk.cl)
*/
ddip = kzalloc(sizeof(struct detached_dev_io_private), GFP_NOIO);
* which would call closure_get(&dc->disk.cl)
*/
ddip = kzalloc(sizeof(struct detached_dev_io_private), GFP_NOIO);
+ if (!ddip) {
+ bio->bi_status = BLK_STS_RESOURCE;
+ bio->bi_end_io(bio);
+ return;
+ }
+
ddip->d = d;
/* Count on the bcache device */
ddip->orig_bdev = orig_bdev;
ddip->d = d;
/* Count on the bcache device */
ddip->orig_bdev = orig_bdev;
@@
-1233,9
+1239,8
@@
static int cached_dev_ioctl(struct bcache_device *d, fmode_t mode,
if (dc->io_disable)
return -EIO;
if (dc->io_disable)
return -EIO;
- if (!dc->bdev->bd_disk->fops->ioctl)
- return -ENOTTY;
- return dc->bdev->bd_disk->fops->ioctl(dc->bdev, mode, cmd, arg);
+
+ return __blkdev_driver_ioctl(dc->bdev, mode, cmd, arg);
}
void bch_cached_dev_request_init(struct cached_dev *dc)
}
void bch_cached_dev_request_init(struct cached_dev *dc)