Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 582f445f authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman
Browse files

Staging: hv: storvsc: Prevent outgoing traffic when stor dev is being destroyed



Prevent outgoing traffic when stor dev is destroyed.

Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f6c17484
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -294,7 +294,8 @@ static inline struct storvsc_device *get_out_stor_device(
	struct storvsc_device *stor_device;

	stor_device = (struct storvsc_device *)device->ext;
	if (stor_device && atomic_read(&stor_device->ref_count) > 1)
	if (stor_device && (atomic_read(&stor_device->ref_count) > 1) &&
		!stor_device->destroy)
		atomic_inc(&stor_device->ref_count);
	else
		stor_device = NULL;