summaryrefslogtreecommitdiffstats
path: root/drivers/block/loop.c
diff options
context:
space:
mode:
authorJens Axboe2017-06-12 16:30:13 +0200
committerJens Axboe2017-06-12 16:30:13 +0200
commit8f66439eec46d652255b9351abebb540ee5b2fd9 (patch)
tree94f4a41dc343cf769cd92f1f7711e9ce8ad43728 /drivers/block/loop.c
parentdm: bump DM_VERSION_MINOR in response to target method error code changes (diff)
parentLinux 4.12-rc5 (diff)
downloadkernel-qcow2-linux-8f66439eec46d652255b9351abebb540ee5b2fd9.tar.gz
kernel-qcow2-linux-8f66439eec46d652255b9351abebb540ee5b2fd9.tar.xz
kernel-qcow2-linux-8f66439eec46d652255b9351abebb540ee5b2fd9.zip
Merge tag 'v4.12-rc5' into for-4.13/block
We've already got a few conflicts and upcoming work depends on some of the changes that have gone into mainline as regression fixes for this series. Pull in 4.12-rc5 to resolve these conflicts and make it easier on down stream trees to continue working on 4.13 changes. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r--drivers/block/loop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 70fd7e0de0fa..9cdf771b66ed 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -615,6 +615,9 @@ static int loop_switch(struct loop_device *lo, struct file *file)
*/
static int loop_flush(struct loop_device *lo)
{
+ /* loop not yet configured, no running thread, nothing to flush */
+ if (lo->lo_state != Lo_bound)
+ return 0;
return loop_switch(lo, NULL);
}