Files
linux/drivers/block
Finn Thain 343962e03d block/swim3: Fix -EBUSY error when re-opening device after unmount
[ Upstream commit 296dcc40f2 ]

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 <userm57@yahoo.com>
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-12 19:44:58 +01:00
..
2016-06-27 12:26:08 -07:00
2016-06-27 12:26:08 -07:00
2011-08-08 11:40:15 +02:00
2016-03-14 09:06:01 -06:00
2016-03-15 15:59:47 -07:00
2016-06-27 12:26:08 -07:00
2016-06-27 12:26:08 -07:00
2013-11-08 09:10:30 -07:00
2009-03-26 21:15:27 +01:00
2018-11-13 11:16:49 -08:00
2016-08-07 14:41:02 -06:00