lightnvm: propagate pblk_init return to userspace
authorRakesh Pandit <rakesh@tuxera.com>
Thu, 20 Apr 2017 18:23:56 +0000 (21:23 +0300)
committerJens Axboe <axboe@fb.com>
Fri, 21 Apr 2017 18:40:41 +0000 (12:40 -0600)
commit8d77bb8276062ff2d991bec71389520dd0156cc3
treee2367341fba648d341aa0d11ca1408b944189836
parentabc25a693091e61537e40dfe24e8ee5deaf08208
lightnvm: propagate pblk_init return to userspace

From userspace calling ioctl(NVM_DEV_CREATE) was returning ENOMEM for
invalid arguments even though pblk (pblk_init) was returning correctly
-EINVAL to nvm_create_tgt inside core.  This patch propagates the
correct return value to userspace.

Because pblk was introduced recently this only needs to go in 4.12.

Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target")
Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/core.c