[PATCH] Deadstore detected by Lukas Bulwahn's CodeChecker Tool (ELISA group)

Aurélien Aptel aaptel at suse.com
Wed May 12 09:38:33 UTC 2021


wenhuizhang <wenhui at gwmail.gwu.edu> writes:
> 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 at gwmail.gwu.edu>

That's better but:
* the subject (first line of commit msg) should be about what the patch
  actually does, usally with a prefix of the subsystem. So for example:
  cifs: remove deadstore in cifs_close_all_deferred_files()
* the body of the commit msg should be wrapped around 80 cols to avoid
  long lines unless you are quoting some output or urls

Cheers,
-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)




More information about the samba-technical mailing list