Skip to content

Commit 4236a26

Browse files
wenhuizhangsmfrench
authored andcommitted
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>
1 parent d07f6ca commit 4236a26

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

fs/cifs/misc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,13 +738,11 @@ void
738738
cifs_close_all_deferred_files(struct cifs_tcon *tcon)
739739
{
740740
struct cifsFileInfo *cfile;
741-
struct cifsInodeInfo *cinode;
742741
struct list_head *tmp;
743742

744743
spin_lock(&tcon->open_file_lock);
745744
list_for_each(tmp, &tcon->openFileList) {
746745
cfile = list_entry(tmp, struct cifsFileInfo, tlist);
747-
cinode = CIFS_I(d_inode(cfile->dentry));
748746
if (delayed_work_pending(&cfile->deferred))
749747
mod_delayed_work(deferredclose_wq, &cfile->deferred, 0);
750748
}

0 commit comments

Comments
 (0)