summaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorAl Viro2019-06-28 06:44:02 +0200
committerAl Viro2019-07-05 00:58:37 +0200
commit1cfb7072c1cc07d3000d3185b8ae8219d520a9b0 (patch)
tree85b4a33af938fc783c230ef56f4885dbaed35cc1 /fs/nfs/super.c
parentceph: don't open-code the check for dead lockref (diff)
downloadkernel-qcow2-linux-1cfb7072c1cc07d3000d3185b8ae8219d520a9b0.tar.gz
kernel-qcow2-linux-1cfb7072c1cc07d3000d3185b8ae8219d520a9b0.tar.xz
kernel-qcow2-linux-1cfb7072c1cc07d3000d3185b8ae8219d520a9b0.zip
nfs: dget_parent() never returns NULL
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index f88ddac2dcdf..bc56ca02d0fe 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -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)