Skip to content

Commit 1cfb707

Browse files
author
Al Viro
committed
nfs: dget_parent() never returns NULL
Signed-off-by: Al Viro <[email protected]>
1 parent 516162b commit 1cfb707

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

fs/nfs/super.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,10 +452,8 @@ int nfs_statfs(struct dentry *dentry, struct kstatfs *buf)
452452
struct dentry *pd_dentry;
453453

454454
pd_dentry = dget_parent(dentry);
455-
if (pd_dentry != NULL) {
456-
nfs_zap_caches(d_inode(pd_dentry));
457-
dput(pd_dentry);
458-
}
455+
nfs_zap_caches(d_inode(pd_dentry));
456+
dput(pd_dentry);
459457
}
460458
nfs_free_fattr(res.fattr);
461459
if (error < 0)

0 commit comments

Comments
 (0)