summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorwenhuizhang <wenhui@gwmail.gwu.edu>2021-05-13 18:55:16 +0200
committerSteve French <stfrench@microsoft.com>2021-05-17 06:05:46 +0200
commit4236a26a6b998c8c4fdc0117b8848a38789c48ae (patch)
treeacd73e5c9a9da78af7deaae4b04907771562f6d6 /fs/cifs
parentLinux 5.13-rc2 (diff)
downloadlinux-4236a26a6b998c8c4fdc0117b8848a38789c48ae.tar.xz
linux-4236a26a6b998c8c4fdc0117b8848a38789c48ae.zip
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>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/misc.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 524dbdfb7184..801a5300f765 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -738,13 +738,11 @@ void
cifs_close_all_deferred_files(struct cifs_tcon *tcon)
{
struct cifsFileInfo *cfile;
- struct cifsInodeInfo *cinode;
struct list_head *tmp;
spin_lock(&tcon->open_file_lock);
list_for_each(tmp, &tcon->openFileList) {
cfile = list_entry(tmp, struct cifsFileInfo, tlist);
- cinode = CIFS_I(d_inode(cfile->dentry));
if (delayed_work_pending(&cfile->deferred))
mod_delayed_work(deferredclose_wq, &cfile->deferred, 0);
}