android_kernel_oneplus_msm8998/drivers/block
Finn Thain a711dcb283 block/swim3: Fix -EBUSY error when re-opening device after unmount
[ Upstream commit 296dcc40f2f2e402facf7cd26cf3f2c8f4b17d47 ]

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-20 10:13:13 +01:00
..
aoe
drbd drbd: skip spurious timeout (ping-timeo) when failing promote 2019-02-20 10:13:11 +01:00
mtip32xx Revert "mtip32xx: use runtime tag to initialize command header" 2018-04-08 11:52:02 +02:00
paride cdrom: do not call check_disk_change() inside cdrom_open() 2018-05-30 07:49:13 +02:00
rsxx
xen-blkback xen-blkback: don't leak stack data via response ring 2017-11-21 09:21:17 +01:00
zram zram: close udev startup race condition as default groups 2018-11-27 16:08:01 +01:00
amiflop.c
ataflop.c ataflop: fix error handling during setup 2018-11-21 09:27:31 +01:00
brd.c
cciss.c
cciss.h
cciss_cmd.h
cciss_scsi.c
cciss_scsi.h
cpqarray.c
cpqarray.h
cryptoloop.c
DAC960.c
DAC960.h
floppy.c floppy: Do not copy a kernel pointer to user memory in FDGETPRM ioctl 2018-10-10 08:52:07 +02:00
hd.c
ida_cmd.h
ida_ioctl.h
Kconfig
loop.c Revert "loop: Fold __loop_release into loop_release" 2019-02-06 19:43:05 +01:00
loop.h block/loop: Use global lock for ioctl() operation. 2019-01-26 09:42:51 +01:00
Makefile
mg_disk.c
nbd.c
null_blk.c
osdblk.c
pktcdvd.c pktcdvd: Fix pkt_setup_dev() error path 2018-02-16 20:09:47 +01:00
ps3disk.c
ps3vram.c
rbd.c rbd: set max_segments to USHRT_MAX 2018-01-17 09:35:30 +01:00
rbd_types.h
skd_main.c skd: Submit requests to firmware before triggering the doorbell 2017-09-27 11:00:14 +02:00
skd_s1120.h
smart1,2.h
sunvdc.c sunvdc: Do not spin in an infinite loop when vio_ldc_send() returns EAGAIN 2019-02-20 10:13:06 +01:00
swim.c swim: fix cleanup on setup error 2018-11-21 09:27:31 +01:00
swim3.c block/swim3: Fix -EBUSY error when re-opening device after unmount 2019-02-20 10:13:13 +01:00
swim_asm.S
sx8.c
umem.c
umem.h
virtio_blk.c virtio_blk: fix panic in initialization error path 2017-08-11 09:08:58 -07:00
xen-blkfront.c
xsysace.c
z2ram.c