1// SPDX-License-Identifier: GPL-3.0-or-later
2
3#pragma once
4
5#include "mos/filesystem/vfs_types.h"
6
7void inode_ref(inode_t *inode);
8
9[[nodiscard]] bool inode_unref(inode_t *inode);
10
11/**
12 * @brief Unlink a dentry from its parent inode
13 *
14 * @param dir The parent inode
15 * @param dentry The dentry to unlink
16 * @return true if the inode was successfully unlinked, false otherwise (but the inode may still be there if other references exist)
17 */
18bool inode_unlink(inode_t *dir, dentry_t *dentry);
19