rtemsbsd/vfs: Use VOP_REMOVE to remove file nodes

This commit is contained in:
Chris Johns
2023-08-07 07:58:30 +10:00
parent afc6ad0525
commit 7cc487f2d3

View File

@@ -679,7 +679,11 @@ restart:
goto restart;
}
vfs_notify_upper(vp, VFS_NOTIFY_UPPER_UNLINK);
error = VOP_RMDIR(dvp, vp, &cn);
if (vp->v_type == VDIR) {
error = VOP_RMDIR(dvp, vp, &cn);
} else {
error = VOP_REMOVE(dvp, vp, &cn);
}
vn_finished_write(mp);
out:
return rtems_bsd_error_to_status_and_errno(error);