]> git.ipfire.org Git - thirdparty/linux.git/commit
cifs: remove deadstore in cifs_close_all_deferred_files()
authorwenhuizhang <wenhui@gwmail.gwu.edu>
Thu, 13 May 2021 16:55:16 +0000 (12:55 -0400)
committerSteve French <stfrench@microsoft.com>
Mon, 17 May 2021 04:05:46 +0000 (23:05 -0500)
commit4236a26a6b998c8c4fdc0117b8848a38789c48ae
treeacd73e5c9a9da78af7deaae4b04907771562f6d6
parentd07f6ca923ea0927a1024dfccafc5b53b61cfecc
cifs: remove deadstore in cifs_close_all_deferred_files()

Deadstore detected by Lukas Bulwahn's CodeChecker Tool (ELISA group).

line 741 struct cifsInodeInfo *cinode;
line 747 cinode = CIFS_I(d_inode(cfile->dentry));
could be deleted.

cinode on filesystem should not be deleted when files are closed,
they are representations of some data fields on a physical disk,
thus no further action is required.
The virtual inode on vfs will be handled by vfs automatically,
and the denotation is inode, which is different from the cinode.

Signed-off-by: wenhuizhang <wenhui@gwmail.gwu.edu>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/misc.c