47 pr_emerg(
"Failed to allocate memfd");
48 return ERR_PTR(-ENOMEM);
55 pr_emerg(
"Failed to create file for memfd");
58 return ERR_PTR(-ENOMEM);
64 pr_emerg(
"Failed to open file for memfd");
82 pr_emerg(
"Failed to mount memfd filesystem");
void dentry_detach(dentry_t *d)
Detach the inode from a dentry.
dentry_t * dentry_ref(dentry_t *dentry)
Increment the reference count of a dentry.
file_t * vfs_do_open_dentry(dentry_t *entry, bool created, bool read, bool write, bool exec, bool truncate)
Open an directory dentry.
bool inode_unlink(inode_t *dir, dentry_t *dentry)
Unlink a dentry from its parent inode.
io_t * memfd_create(const char *name)
static dentry_t * memfd_root_dentry
static void memfd_file_release(file_t *file)
static const file_ops_t memfd_file_ops
static slab_t * memfd_slab
#define pr_emerg(fmt,...)
#define MOS_INIT(_comp, _fn)
#define SLAB_AUTOINIT(name, var, type)
superblock_t * superblock
dentry_t *(* mount)(filesystem_t *fs, const char *dev_name, const char *mount_options)
bool(* newfile)(inode_t *dir, dentry_t *dentry, file_type_t type, file_perm_t perm)
create a new file
const file_ops_t * file_ops
ssize_t vfs_generic_write(const file_t *file, const void *buf, size_t size, off_t offset)
dentry_t * dentry_get_from_parent(superblock_t *sb, dentry_t *parent, const char *name)
Create a new dentry with the given name and parent.
ssize_t vfs_generic_read(const file_t *file, void *buf, size_t size, off_t offset)