cifs: ignore resource_id while getting fscache super cookie
authorShyam Prasad N <sprasad@microsoft.com>
Wed, 8 Dec 2021 16:33:19 +0000 (16:33 +0000)
committerSteve French <stfrench@microsoft.com>
Sat, 18 Dec 2021 01:09:06 +0000 (19:09 -0600)
commitb774302e885697dde027825f8de9beb985d037bd
tree1e86703c2bfe19af904ef530d17e4172b12fa064
parent2585cf9dfaaddf00b069673f27bb3f8530e2039c
cifs: ignore resource_id while getting fscache super cookie

We have a cyclic dependency between fscache super cookie
and root inode cookie. The super cookie relies on
tcon->resource_id, which gets populated from the root inode
number. However, fetching the root inode initializes inode
cookie as a child of super cookie, which is yet to be populated.

resource_id is only used as auxdata to check the validity of
super cookie. We can completely avoid setting resource_id to
remove the circular dependency. Since vol creation time and
vol serial numbers are used for auxdata, we should be fine.
Additionally, there will be auxiliary data check for each
inode cookie as well.

Fixes: 5bf91ef03d98 ("cifs: wait for tcon resource_id before getting fscache super")
CC: David Howells <dhowells@redhat.com>
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c
fs/cifs/inode.c