summaryrefslogtreecommitdiffstats
path: root/net/rds/iw_sysctl.c
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2012-11-16 16:29:16 +0100
committerAlex Elder <elder@inktank.com>2012-12-17 15:36:59 +0100
commit42382b709bd1d143b9f0fa93e0a3a1f2f4210707 (patch)
tree2d6a8c6910ab15bffed7ab91d74005e05984f891 /net/rds/iw_sysctl.c
parentlibceph: Unlock unprocessed pages in start_read() error path (diff)
downloadlinux-42382b709bd1d143b9f0fa93e0a3a1f2f4210707.tar.xz
linux-42382b709bd1d143b9f0fa93e0a3a1f2f4210707.zip
rbd: do not allow remove of mounted-on image
There is no check in rbd_remove() to see if anybody holds open the image being removed. That's not cool. Add a simple open count that goes up and down with opens and closes (releases) of the device, and don't allow an rbd image to be removed if the count is non-zero. Protect the updates of the open count value with ctl_mutex to ensure the underlying rbd device doesn't get removed while concurrently being opened. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'net/rds/iw_sysctl.c')
0 files changed, 0 insertions, 0 deletions