Re: [PATCH] block/swim3: Fix -EBUSY error when re-opening device after unmount

2018-12-31 Thread Jens Axboe
On 12/30/18 10:44 PM, Finn Thain wrote: > When the block device is opened with FMODE_EXCL, ref_count is set to -1. > This value doesn't get reset when the device is closed which means the > device cannot be opened again. Fix this by checking for refcount <= 0 > in the release method. Applied,

[PATCH] block/swim3: Fix -EBUSY error when re-opening device after unmount

2018-12-30 Thread Finn Thain
When the block device is opened with FMODE_EXCL, ref_count is set to -1. This value doesn't get reset when the device is closed which means the device cannot be opened again. Fix this by checking for refcount <= 0 in the release method. Reported-and-tested-by: Stan Johnson Fixes: 1da177e4c3f4