OSDN Git Service

nfs: dget_parent() never returns NULL
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 28 Jun 2019 04:44:02 +0000 (00:44 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 4 Jul 2019 22:58:37 +0000 (18:58 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/nfs/super.c

index f88ddac..bc56ca0 100644 (file)
@@ -452,10 +452,8 @@ int nfs_statfs(struct dentry *dentry, struct kstatfs *buf)
                struct dentry *pd_dentry;
 
                pd_dentry = dget_parent(dentry);
-               if (pd_dentry != NULL) {
-                       nfs_zap_caches(d_inode(pd_dentry));
-                       dput(pd_dentry);
-               }
+               nfs_zap_caches(d_inode(pd_dentry));
+               dput(pd_dentry);
        }
        nfs_free_fattr(res.fattr);
        if (error < 0)