Files
i2som-imx-linux/drivers
Ilya Dryomov 022ce60cc6 rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set
commit 85f5a4d666 upstream.

There is a window between when RBD_DEV_FLAG_REMOVING is set and when
the device is removed from rbd_dev_list.  During this window, we set
"already" and return 0.

Returning 0 from write(2) can confuse userspace tools because
0 indicates that nothing was written.  In particular, "rbd unmap"
will retry the write multiple times a second:

  10:28:05.463299 write(4, "0", 1)        = 0
  10:28:05.463509 write(4, "0", 1)        = 0
  10:28:05.463720 write(4, "0", 1)        = 0
  10:28:05.463942 write(4, "0", 1)        = 0
  10:28:05.464155 write(4, "0", 1)        = 0

Cc: stable@vger.kernel.org
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-16 22:07:12 +01:00
..
2018-07-22 14:28:43 +02:00
2018-07-03 11:24:56 +02:00
2019-01-13 10:00:59 +01:00
2018-12-21 14:13:14 +01:00
2019-01-13 10:01:07 +01:00
2018-12-29 13:39:09 +01:00
2018-11-10 07:48:34 -08:00
2018-09-15 09:45:27 +02:00
2018-12-21 14:13:13 +01:00
2018-11-13 11:15:11 -08:00
2019-01-13 10:01:01 +01:00
2018-11-27 16:10:51 +01:00
2018-10-03 17:00:46 -07:00