summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-06-28 00:44:02 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2019-07-04 18:58:37 -0400
commit1cfb7072c1cc07d3000d3185b8ae8219d520a9b0 (patch)
tree85b4a33af938fc783c230ef56f4885dbaed35cc1 /fs
parent516162b92d1b72995ce796b98bb8c7992d9f5b5f (diff)
downloadlinux-stable-1cfb7072c1cc07d3000d3185b8ae8219d520a9b0.tar.gz
linux-stable-1cfb7072c1cc07d3000d3185b8ae8219d520a9b0.tar.bz2
linux-stable-1cfb7072c1cc07d3000d3185b8ae8219d520a9b0.zip
nfs: dget_parent() never returns NULL
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-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)