mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
nfs: Remove redundant null checks before kfree
Fix the following coccicheck warning: fs/nfs/dir.c:2494:2-7: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Yushan Zhou <katrinzhou@tencent.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
247f34f7b8
commit
121affdf8a
@ -2489,9 +2489,8 @@ int nfs_unlink(struct inode *dir, struct dentry *dentry)
|
||||
spin_unlock(&dentry->d_lock);
|
||||
goto out;
|
||||
}
|
||||
if (dentry->d_fsdata)
|
||||
/* old devname */
|
||||
kfree(dentry->d_fsdata);
|
||||
/* old devname */
|
||||
kfree(dentry->d_fsdata);
|
||||
dentry->d_fsdata = NFS_FSDATA_BLOCKED;
|
||||
|
||||
spin_unlock(&dentry->d_lock);
|
||||
|
Loading…
Reference in New Issue
Block a user