]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: add server conn_id to fscache client cookie
authorShyam Prasad N <sprasad@microsoft.com>
Thu, 2 Dec 2021 07:30:00 +0000 (07:30 +0000)
committerSteve French <stfrench@microsoft.com>
Fri, 3 Dec 2021 18:36:04 +0000 (12:36 -0600)
commit58bfa1b0c19f27c36227452cec5b43c5b5edf7aa
treec6b526729e658d7141a055a97515bc3362ad3b19
parent9dd7db593cdea990673c59bd6ddb18a7f3f881f1
cifs: add server conn_id to fscache client cookie

The fscache client cookie uses the server address
(and port) as the cookie key. This is a problem when
nosharesock is used. Two different connections will
use duplicate cookies. Avoid this by adding
server->conn_id to the key, so that it's guaranteed
that cookie will not be duplicated.

Also, for secondary channels of a session, copy the
fscache pointer from the primary channel. The primary
channel is guaranteed not to go away as long as secondary
channels are in use.  Also addresses minor problem found
by kernel test robot.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c
fs/cifs/fscache.c