diff options
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r-- | drivers/block/loop.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 70fd7e0..9cdf771 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); } |