mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
smb: client: Remove redundant check in cifs_oplock_break()
There is an unnecessary NULL check of inode in cifs_oplock_break(), since there are multiple dereferences of cinode prior to it. Based on usage of cifs_oplock_break() in cifs_new_fileinfo() we can safely assume that inode is not NULL, so there is no need to check inode in cifs_oplock_break() at all. Therefore, this redundant check can be removed. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Ivan Abramov <i.abramov@mt-integration.ru> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
faf1b64888
commit
9fb2e20e4f
|
|
@ -3082,7 +3082,7 @@ void cifs_oplock_break(struct work_struct *work)
|
|||
cinode->oplock = 0;
|
||||
}
|
||||
|
||||
if (inode && S_ISREG(inode->i_mode)) {
|
||||
if (S_ISREG(inode->i_mode)) {
|
||||
if (CIFS_CACHE_READ(cinode))
|
||||
break_lease(inode, O_RDONLY);
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user