diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-12 08:43:53 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-12 08:43:53 +0200 |
| commit | 81606aea2303aa11867e97030299b1057091c2fd (patch) | |
| tree | f9231fa1ebc03221afc54507602ee0ff057da2cb /drivers/block/loop.c | |
| parent | ef189c8dde9a82962ddb2511ee00ab8d4719dfca (diff) | |
| parent | 32c1431eea4881a6b17bd7c639315010aeefa452 (diff) | |
Merge 4.12-rc5 into usb-next
We want the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 28d932906f24..ebbd0c3fe0ed 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -608,6 +608,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); } |
