cifs: fixes for get_inode_info
authorMeetakshi Setiya <msetiya@microsoft.com>
Thu, 14 Mar 2024 12:05:49 +0000 (08:05 -0400)
committerSteve French <stfrench@microsoft.com>
Thu, 14 Mar 2024 18:54:27 +0000 (13:54 -0500)
commitfc20c523211a38b87fc850a959cb2149e4fd64b0
treed6a5d9294fa584471fb0368933985e28deb2142a
parentf1b8224b4e6ed59e7e6f5c548673c67410098d8d
cifs: fixes for get_inode_info

Fix potential memory leaks, add error checking, remove unnecessary
initialisation of status_file_deleted and do not use cifs_iget() to get
inode in reparse_info_to_fattr since fattrs may not be fully set.

Fixes: ffceb7640cbf ("smb: client: do not defer close open handles to deleted files")
Reported-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Meetakshi Setiya <msetiya@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/file.c
fs/smb/client/inode.c