MOS Source Code
Loading...
Searching...
No Matches
inode.c File Reference
+ Include dependency graph for inode.c:

Go to the source code of this file.

Functions

 SLAB_AUTOINIT ("inode", inode_cache, inode_t)
 
static bool vfs_generic_inode_drop (inode_t *inode)
 
static bool inode_try_drop (inode_t *inode)
 
void inode_init (inode_t *inode, superblock_t *sb, u64 ino, file_type_t type)
 
inode_tinode_create (superblock_t *sb, u64 ino, file_type_t type)
 
void inode_ref (inode_t *inode)
 
bool inode_unref (inode_t *inode)
 
bool inode_unlink (inode_t *dir, dentry_t *dentry)
 Unlink a dentry from its parent inode.
 

Variables

slab_tinode_cache
 

Function Documentation

◆ SLAB_AUTOINIT()

SLAB_AUTOINIT ( "inode" ,
inode_cache ,
inode_t  )

◆ vfs_generic_inode_drop()

static bool vfs_generic_inode_drop ( inode_t * inode)
static

Definition at line 16 of file inode.c.

Referenced by inode_try_drop().

◆ inode_try_drop()

static bool inode_try_drop ( inode_t * inode)
static

Definition at line 23 of file inode.c.

Referenced by inode_unlink(), and inode_unref().

+ Here is the call graph for this function:

◆ inode_init()

void inode_init ( inode_t * inode,
superblock_t * sb,
u64 ino,
file_type_t type )

Definition at line 49 of file inode.c.

Referenced by cpio_inode_trycreate(), inode_create(), and tmpfs_create_inode().

+ Here is the call graph for this function:

◆ inode_create()

inode_t * inode_create ( superblock_t * sb,
u64 ino,
file_type_t type )

Definition at line 65 of file inode.c.

Referenced by i_from_pbfull(), MOS_INIT(), sysfs_create_inode(), sysfs_do_register(), and sysfs_register_file().

+ Here is the call graph for this function:

◆ inode_ref()

void inode_ref ( inode_t * inode)

Definition at line 72 of file inode.c.

Referenced by dentry_attach(), and dentry_ref().

◆ inode_unref()

bool inode_unref ( inode_t * inode)
nodiscard

Definition at line 78 of file inode.c.

Referenced by dentry_detach(), and dentry_unref_one_norelease().

+ Here is the call graph for this function:

◆ inode_unlink()

bool inode_unlink ( inode_t * dir,
dentry_t * dentry )

Unlink a dentry from its parent inode.

Parameters
dirThe parent inode
dentryThe dentry to unlink
Returns
true if the inode was successfully unlinked, false otherwise (but the inode may still be there if other references exist)

Definition at line 86 of file inode.c.

Referenced by memfd_create(), and vfs_unlinkat().

+ Here is the call graph for this function:

Variable Documentation

◆ inode_cache

slab_t* inode_cache

Definition at line 13 of file inode.c.

Referenced by inode_create().