Skip to content
Snippets Groups Projects
Commit 0822c3ca authored by Gleb Natapov's avatar Gleb Natapov Committed by Pekka Enberg
Browse files

vfs: remove dentry of an unliked file from dentry cache


If dentry has elevated reference count during unlink (a file is opened
for instance) it is not destroyed and remains in the dentry hash.
As a result unlinked file is still accessible.

Signed-off-by: default avatarGleb Natapov <gleb@cloudius-systems.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
parent b4666431
No related branches found
No related tags found
No related merge requests found
......@@ -839,6 +839,7 @@ sys_unlink(char *path)
vn_unlock(ddp->d_vnode);
vn_unlock(vp);
dentry_remove(dp);
drele(ddp);
drele(dp);
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment