Skip to content

Commit

Permalink
hypfs: don't bother with d_delete()
Browse files Browse the repository at this point in the history
If that's not the last reference, d_delete() will do d_drop().
If it is, dput() immediately after it will unhash the sucker
anyway, since ->d_delete() the method is always_delete_dentry().

IOW, there's no point trying to turn it into a negative hashed
dentry - it won't stick around anyway.  Just d_drop() it and be
done with that.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Sep 3, 2019
1 parent 84a2bd3 commit 29dfeb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/hypfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static void hypfs_remove(struct dentry *dentry)
else
simple_unlink(d_inode(parent), dentry);
}
d_delete(dentry);
d_drop(dentry);
dput(dentry);
inode_unlock(d_inode(parent));
}
Expand Down

0 comments on commit 29dfeb0

Please sign in to comment.