Enzo Matsumiya 9351590f51 cifs: properly invalidate cached root handle when closing it
Cached root file was not being completely invalidated sometimes.

Reproducing:
- With a DFS share with 2 targets, one disabled and one enabled
- start some I/O on the mount
  # while true; do ls /mnt/dfs; done
- at the same time, disable the enabled target and enable the disabled
  one
- wait for DFS cache to expire
- on reconnect, the previous cached root handle should be invalid, but
  open_cached_dir_by_dentry() will still try to use it, but throws a
  use-after-free warning (kref_get())

Make smb2_close_cached_fid() invalidate all fields every time, but only
send an SMB2_close() when the entry is still valid.

Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
2021-09-09 17:34:38 -05:00
..
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-07-09 13:03:36 -05:00
2020-06-01 00:10:18 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2020-08-02 18:00:25 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2021-06-20 21:28:17 -05:00
2019-01-24 09:37:33 -06:00
2021-04-25 16:28:23 -05:00
2021-06-20 21:28:17 -05:00