Skip to content

Commit

Permalink
nfs: dget_parent() never returns NULL
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jul 4, 2019
1 parent 516162b commit 1cfb707
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1cfb707

Please sign in to comment.