cifs: added WARN_ON for all the count decrements
authorShyam Prasad N <sprasad@microsoft.com>
Thu, 15 Jul 2021 04:00:00 +0000 (23:00 -0500)
committerSteve French <stfrench@microsoft.com>
Fri, 16 Jul 2021 00:07:00 +0000 (19:07 -0500)
commit16dd9b8c31aee7ae074fa3ee36a797e9ba9f7e4f
treed1d3f47648bd38eb5e40c13ccc9013dc32314703
parent63f94e946fafcfc5080b4a4aec9770158268e4ee
cifs: added WARN_ON for all the count decrements

We have a few ref counters srv_count, ses_count and
tc_count which we use for ref counting. Added a WARN_ON
during the decrement of each of these counters to make
sure that they don't go below their minimum values.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c
fs/cifs/smb2ops.c