summaryrefslogtreecommitdiff
path: root/nuttx/fs
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/fs')
-rw-r--r--nuttx/fs/fat/fs_fat32.c12
-rw-r--r--nuttx/fs/fat/fs_fat32.h4
-rw-r--r--nuttx/fs/fat/fs_mkfatfs.c2
-rw-r--r--nuttx/fs/fs_automount.c2
-rw-r--r--nuttx/fs/fs_foreachinode.c2
-rw-r--r--nuttx/fs/fs_inode.c2
-rw-r--r--nuttx/fs/fs_inoderelease.c2
-rw-r--r--nuttx/fs/fs_inoderemove.c2
-rw-r--r--nuttx/fs/fs_select.c2
-rw-r--r--nuttx/fs/nfs/nfs_vfsops.c16
-rw-r--r--nuttx/fs/nxffs/nxffs.h2
-rw-r--r--nuttx/fs/nxffs/nxffs_dump.c4
-rw-r--r--nuttx/fs/nxffs/nxffs_initialize.c6
-rw-r--r--nuttx/fs/nxffs/nxffs_inode.c4
-rw-r--r--nuttx/fs/nxffs/nxffs_open.c8
-rw-r--r--nuttx/fs/procfs/fs_procfs.c4
-rw-r--r--nuttx/fs/procfs/fs_procfscpuload.c2
-rw-r--r--nuttx/fs/procfs/fs_procfsproc.c8
-rw-r--r--nuttx/fs/procfs/fs_procfsuptime.c2
-rw-r--r--nuttx/fs/procfs/fs_skeleton.c4
-rw-r--r--nuttx/fs/romfs/fs_romfs.c12
-rw-r--r--nuttx/fs/smartfs/smartfs_procfs.c4
-rw-r--r--nuttx/fs/smartfs/smartfs_smart.c22
-rw-r--r--nuttx/fs/smartfs/smartfs_utils.c8
24 files changed, 68 insertions, 68 deletions
diff --git a/nuttx/fs/fat/fs_fat32.c b/nuttx/fs/fat/fs_fat32.c
index 3890810d4..677924057 100644
--- a/nuttx/fs/fat/fs_fat32.c
+++ b/nuttx/fs/fat/fs_fat32.c
@@ -363,7 +363,7 @@ static int fat_open(FAR struct file *filep, const char *relpath,
off_t offset = fat_seek(filep, ff->ff_size, SEEK_SET);
if (offset < 0)
{
- kfree(ff);
+ kmm_free(ff);
return (int)offset;
}
}
@@ -375,7 +375,7 @@ static int fat_open(FAR struct file *filep, const char *relpath,
*/
errout_with_struct:
- kfree(ff);
+ kmm_free(ff);
errout_with_semaphore:
fat_semgive(fs);
@@ -425,7 +425,7 @@ static int fat_close(FAR struct file *filep)
/* Then free the file structure itself. */
- kfree(ff);
+ kmm_free(ff);
filep->f_priv = NULL;
return ret;
}
@@ -1417,7 +1417,7 @@ static int fat_dup(FAR const struct file *oldp, FAR struct file *newp)
*/
errout_with_struct:
- kfree(newff);
+ kmm_free(newff);
errout_with_semaphore:
fat_semgive(fs);
@@ -1778,7 +1778,7 @@ static int fat_bind(FAR struct inode *blkdriver, const void *data,
if (ret != 0)
{
sem_destroy(&fs->fs_sem);
- kfree(fs);
+ kmm_free(fs);
return ret;
}
@@ -1849,7 +1849,7 @@ static int fat_unbind(void *handle, FAR struct inode **blkdriver)
fat_io_free(fs->fs_buffer, fs->fs_hwsectorsize);
}
- kfree(fs);
+ kmm_free(fs);
}
fat_semgive(fs);
diff --git a/nuttx/fs/fat/fs_fat32.h b/nuttx/fs/fat/fs_fat32.h
index 2606aca45..8670743ef 100644
--- a/nuttx/fs/fat/fs_fat32.h
+++ b/nuttx/fs/fat/fs_fat32.h
@@ -701,8 +701,8 @@
# define fat_io_alloc(s) fat_dma_alloc(s)
# define fat_io_free(m,s) fat_dma_free(m,s)
#else
-# define fat_io_alloc(s) kmalloc(s)
-# define fat_io_free(m,s) kfree(m)
+# define fat_io_alloc(s) kmm_malloc(s)
+# define fat_io_free(m,s) kmm_free(m)
#endif
/****************************************************************************
diff --git a/nuttx/fs/fat/fs_mkfatfs.c b/nuttx/fs/fat/fs_mkfatfs.c
index 1191768f8..4445c5a4c 100644
--- a/nuttx/fs/fat/fs_mkfatfs.c
+++ b/nuttx/fs/fat/fs_mkfatfs.c
@@ -319,7 +319,7 @@ errout:
if (var.fv_sect)
{
- kfree(var.fv_sect);
+ kmm_free(var.fv_sect);
}
/* Return any reported errors */
diff --git a/nuttx/fs/fs_automount.c b/nuttx/fs/fs_automount.c
index 5e35f0b68..ff40c9230 100644
--- a/nuttx/fs/fs_automount.c
+++ b/nuttx/fs/fs_automount.c
@@ -633,5 +633,5 @@ void automount_uninitialize(FAR void *handle)
/* And free the state structure */
- kfree(priv);
+ kmm_free(priv);
}
diff --git a/nuttx/fs/fs_foreachinode.c b/nuttx/fs/fs_foreachinode.c
index 17c684cf7..b1b6439d7 100644
--- a/nuttx/fs/fs_foreachinode.c
+++ b/nuttx/fs/fs_foreachinode.c
@@ -208,7 +208,7 @@ int foreach_inode(foreach_inode_t handler, FAR void *arg)
/* Free the info structure and return the result */
- kfree(info);
+ kmm_free(info);
return ret;
#else
diff --git a/nuttx/fs/fs_inode.c b/nuttx/fs/fs_inode.c
index e3133088f..6d2b741ea 100644
--- a/nuttx/fs/fs_inode.c
+++ b/nuttx/fs/fs_inode.c
@@ -400,7 +400,7 @@ void inode_free(FAR struct inode *node)
{
inode_free(node->i_peer);
inode_free(node->i_child);
- kfree(node);
+ kmm_free(node);
}
}
diff --git a/nuttx/fs/fs_inoderelease.c b/nuttx/fs/fs_inoderelease.c
index bc5026534..0040426d6 100644
--- a/nuttx/fs/fs_inoderelease.c
+++ b/nuttx/fs/fs_inoderelease.c
@@ -95,7 +95,7 @@ void inode_release(FAR struct inode *node)
{
inode_semgive();
inode_free(node->i_child);
- kfree(node);
+ kmm_free(node);
}
else
{
diff --git a/nuttx/fs/fs_inoderemove.c b/nuttx/fs/fs_inoderemove.c
index 8258b1151..3466d8952 100644
--- a/nuttx/fs/fs_inoderemove.c
+++ b/nuttx/fs/fs_inoderemove.c
@@ -170,7 +170,7 @@ int inode_remove(FAR const char *path)
/* And delete it now -- recursively to delete all of its children */
inode_free(node->i_child);
- kfree(node);
+ kmm_free(node);
return OK;
}
}
diff --git a/nuttx/fs/fs_select.c b/nuttx/fs/fs_select.c
index 2b4fdf543..556591b9e 100644
--- a/nuttx/fs/fs_select.c
+++ b/nuttx/fs/fs_select.c
@@ -262,7 +262,7 @@ int select(int nfds, FAR fd_set *readfds, FAR fd_set *writefds,
}
}
- kfree(pollset);
+ kmm_free(pollset);
return ret;
}
diff --git a/nuttx/fs/nfs/nfs_vfsops.c b/nuttx/fs/nfs/nfs_vfsops.c
index 54bfcd153..6654f3baf 100644
--- a/nuttx/fs/nfs/nfs_vfsops.c
+++ b/nuttx/fs/nfs/nfs_vfsops.c
@@ -656,7 +656,7 @@ static int nfs_open(FAR struct file *filep, FAR const char *relpath,
errout_with_semaphore:
if (np)
{
- kfree(np);
+ kmm_free(np);
}
nfs_semgive(nmp);
@@ -745,7 +745,7 @@ static int nfs_close(FAR struct file *filep)
/* Then deallocate the file structure and return success */
- kfree(np);
+ kmm_free(np);
ret = OK;
break;
}
@@ -1840,15 +1840,15 @@ bad:
sem_destroy(&nmp->nm_sem);
if (nmp->nm_so)
{
- kfree(nmp->nm_so);
+ kmm_free(nmp->nm_so);
}
if (nmp->nm_rpcclnt)
{
- kfree(nmp->nm_rpcclnt);
+ kmm_free(nmp->nm_rpcclnt);
}
- kfree(nmp);
+ kmm_free(nmp);
}
return error;
@@ -1905,9 +1905,9 @@ int nfs_unbind(FAR void *handle, FAR struct inode **blkdriver)
/* And free any allocated resources */
sem_destroy(&nmp->nm_sem);
- kfree(nmp->nm_so);
- kfree(nmp->nm_rpcclnt);
- kfree(nmp);
+ kmm_free(nmp->nm_so);
+ kmm_free(nmp->nm_rpcclnt);
+ kmm_free(nmp);
return -error;
diff --git a/nuttx/fs/nxffs/nxffs.h b/nuttx/fs/nxffs/nxffs.h
index 26e35f506..87bc06227 100644
--- a/nuttx/fs/nxffs/nxffs.h
+++ b/nuttx/fs/nxffs/nxffs.h
@@ -577,7 +577,7 @@ int nxffs_getc(FAR struct nxffs_volume_s *volume, uint16_t reserve);
* to dispose of that memory when the inode entry is no longer needed.
*
* Note that the nxffs_entry_s containing structure is not freed. The
- * caller may call kfree upon return of this function if necessary to
+ * caller may call kmm_free upon return of this function if necessary to
* free the entry container.
*
* Input parameters:
diff --git a/nuttx/fs/nxffs/nxffs_dump.c b/nuttx/fs/nxffs/nxffs_dump.c
index c42a007db..2cc50b1e0 100644
--- a/nuttx/fs/nxffs/nxffs_dump.c
+++ b/nuttx/fs/nxffs/nxffs_dump.c
@@ -465,7 +465,7 @@ int nxffs_dump(FAR struct mtd_dev_s *mtd, bool verbose)
/* Read errors are fatal */
fdbg("ERROR: Failed to read block %d\n", blkinfo.block);
- kfree(blkinfo.buffer);
+ kmm_free(blkinfo.buffer);
return ret;
#else
/* A read error is probably fatal on all media but NAND.
@@ -488,7 +488,7 @@ int nxffs_dump(FAR struct mtd_dev_s *mtd, bool verbose)
fdbg("%d blocks analyzed\n", blkinfo.nblocks);
- kfree(blkinfo.buffer);
+ kmm_free(blkinfo.buffer);
return OK;
#else
diff --git a/nuttx/fs/nxffs/nxffs_initialize.c b/nuttx/fs/nxffs/nxffs_initialize.c
index ec5239545..34ac847ad 100644
--- a/nuttx/fs/nxffs/nxffs_initialize.c
+++ b/nuttx/fs/nxffs/nxffs_initialize.c
@@ -313,12 +313,12 @@ int nxffs_initialize(FAR struct mtd_dev_s *mtd)
fdbg("ERROR: Failed to calculate file system limits: %d\n", -ret);
errout_with_buffer:
- kfree(volume->pack);
+ kmm_free(volume->pack);
errout_with_cache:
- kfree(volume->cache);
+ kmm_free(volume->cache);
errout_with_volume:
#ifndef CONFIG_NXFFS_PREALLOCATED
- kfree(volume);
+ kmm_free(volume);
#endif
return ret;
}
diff --git a/nuttx/fs/nxffs/nxffs_inode.c b/nuttx/fs/nxffs/nxffs_inode.c
index 7efcbd5f2..4af7cfe41 100644
--- a/nuttx/fs/nxffs/nxffs_inode.c
+++ b/nuttx/fs/nxffs/nxffs_inode.c
@@ -222,7 +222,7 @@ errout:
* to dispose of that memory when the inode entry is no longer needed.
*
* Note that the nxffs_entry_s containing structure is not freed. The
- * caller may call kfree upon return of this function if necessary to
+ * caller may call kmm_free upon return of this function if necessary to
* free the entry container.
*
* Input parameters:
@@ -237,7 +237,7 @@ void nxffs_freeentry(FAR struct nxffs_entry_s *entry)
{
if (entry->name)
{
- kfree(entry->name);
+ kmm_free(entry->name);
entry->name = NULL;
}
}
diff --git a/nuttx/fs/nxffs/nxffs_open.c b/nuttx/fs/nxffs/nxffs_open.c
index 2859c31bd..d049ef693 100644
--- a/nuttx/fs/nxffs/nxffs_open.c
+++ b/nuttx/fs/nxffs/nxffs_open.c
@@ -678,10 +678,10 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume,
return OK;
errout_with_name:
- kfree(wrfile->ofile.entry.name);
+ kmm_free(wrfile->ofile.entry.name);
errout_with_ofile:
#ifndef CONFIG_NXFFS_PREALLOCATED
- kfree(wrfile);
+ kmm_free(wrfile);
#endif
errout_with_exclsem:
@@ -785,7 +785,7 @@ static inline int nxffs_rdopen(FAR struct nxffs_volume_s *volume,
return OK;
errout_with_ofile:
- kfree(ofile);
+ kmm_free(ofile);
errout_with_exclsem:
sem_post(&volume->exclsem);
errout:
@@ -856,7 +856,7 @@ static inline void nxffs_freeofile(FAR struct nxffs_volume_s *volume,
if ((FAR struct nxffs_wrfile_s*)ofile != &g_wrfile)
#endif
{
- kfree(ofile);
+ kmm_free(ofile);
}
}
diff --git a/nuttx/fs/procfs/fs_procfs.c b/nuttx/fs/procfs/fs_procfs.c
index 8969e8948..3351d7bf8 100644
--- a/nuttx/fs/procfs/fs_procfs.c
+++ b/nuttx/fs/procfs/fs_procfs.c
@@ -337,7 +337,7 @@ static int procfs_close(FAR struct file *filep)
/* Release the file attributes structure */
- kfree(attr);
+ kmm_free(attr);
filep->f_priv = NULL;
return OK;
}
@@ -557,7 +557,7 @@ static int procfs_closedir(FAR struct inode *mountpt,
if (priv)
{
- kfree(priv);
+ kmm_free(priv);
}
dir->u.procfs = NULL;
diff --git a/nuttx/fs/procfs/fs_procfscpuload.c b/nuttx/fs/procfs/fs_procfscpuload.c
index 93776b496..e6bc1b398 100644
--- a/nuttx/fs/procfs/fs_procfscpuload.c
+++ b/nuttx/fs/procfs/fs_procfscpuload.c
@@ -194,7 +194,7 @@ static int cpuload_close(FAR struct file *filep)
/* Release the file attributes structure */
- kfree(attr);
+ kmm_free(attr);
filep->f_priv = NULL;
return OK;
}
diff --git a/nuttx/fs/procfs/fs_procfsproc.c b/nuttx/fs/procfs/fs_procfsproc.c
index c5b1b67c3..50cec9ed2 100644
--- a/nuttx/fs/procfs/fs_procfsproc.c
+++ b/nuttx/fs/procfs/fs_procfsproc.c
@@ -1011,7 +1011,7 @@ static int proc_close(FAR struct file *filep)
/* Release the file container structure */
- kfree(procfile);
+ kmm_free(procfile);
filep->f_priv = NULL;
return OK;
}
@@ -1221,7 +1221,7 @@ static int proc_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir)
if (!node)
{
fdbg("ERROR: Invalid path \"%s\"\n", relpath);
- kfree(procdir);
+ kmm_free(procdir);
return -ENOENT;
}
@@ -1230,7 +1230,7 @@ static int proc_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir)
if (node->dtype != DTYPE_DIRECTORY)
{
fdbg("ERROR: Path \"%s\" is not a directory\n", relpath);
- kfree(procdir);
+ kmm_free(procdir);
return -ENOTDIR;
}
@@ -1270,7 +1270,7 @@ static int proc_closedir(FAR struct fs_dirent_s *dir)
if (priv)
{
- kfree(priv);
+ kmm_free(priv);
}
dir->u.procfs = NULL;
diff --git a/nuttx/fs/procfs/fs_procfsuptime.c b/nuttx/fs/procfs/fs_procfsuptime.c
index 8d077b24f..acbeb5595 100644
--- a/nuttx/fs/procfs/fs_procfsuptime.c
+++ b/nuttx/fs/procfs/fs_procfsuptime.c
@@ -196,7 +196,7 @@ static int uptime_close(FAR struct file *filep)
/* Release the file attributes structure */
- kfree(attr);
+ kmm_free(attr);
filep->f_priv = NULL;
return OK;
}
diff --git a/nuttx/fs/procfs/fs_skeleton.c b/nuttx/fs/procfs/fs_skeleton.c
index 5054cb49b..28f5ff051 100644
--- a/nuttx/fs/procfs/fs_skeleton.c
+++ b/nuttx/fs/procfs/fs_skeleton.c
@@ -210,7 +210,7 @@ static int skel_close(FAR struct file *filep)
/* Release the file attributes structure */
- kfree(priv);
+ kmm_free(priv);
filep->f_priv = NULL;
return OK;
}
@@ -342,7 +342,7 @@ static int skel_closedir(FAR struct fs_dirent_s *dir)
if (priv)
{
- kfree(priv);
+ kmm_free(priv);
}
dir->u.procfs = NULL;
diff --git a/nuttx/fs/romfs/fs_romfs.c b/nuttx/fs/romfs/fs_romfs.c
index e2999f364..1197270ef 100644
--- a/nuttx/fs/romfs/fs_romfs.c
+++ b/nuttx/fs/romfs/fs_romfs.c
@@ -318,12 +318,12 @@ static int romfs_close(FAR struct file *filep)
if (!rm->rm_xipbase && rf->rf_buffer)
{
- kfree(rf->rf_buffer);
+ kmm_free(rf->rf_buffer);
}
/* Then free the file structure itself. */
- kfree(rf);
+ kmm_free(rf);
filep->f_priv = NULL;
return ret;
}
@@ -960,12 +960,12 @@ static int romfs_bind(FAR struct inode *blkdriver, FAR const void *data,
errout_with_buffer:
if (!rm->rm_xipbase)
{
- kfree(rm->rm_buffer);
+ kmm_free(rm->rm_buffer);
}
errout_with_sem:
sem_destroy(&rm->rm_sem);
- kfree(rm);
+ kmm_free(rm);
return ret;
}
@@ -1032,11 +1032,11 @@ static int romfs_unbind(FAR void *handle, FAR struct inode **blkdriver)
if (!rm->rm_xipbase && rm->rm_buffer)
{
- kfree(rm->rm_buffer);
+ kmm_free(rm->rm_buffer);
}
sem_destroy(&rm->rm_sem);
- kfree(rm);
+ kmm_free(rm);
return OK;
}
diff --git a/nuttx/fs/smartfs/smartfs_procfs.c b/nuttx/fs/smartfs/smartfs_procfs.c
index 9bac410ea..8f8ff3d4f 100644
--- a/nuttx/fs/smartfs/smartfs_procfs.c
+++ b/nuttx/fs/smartfs/smartfs_procfs.c
@@ -210,7 +210,7 @@ static int smartfs_close(FAR struct file *filep)
/* Release the file attributes structure */
- kfree(priv);
+ kmm_free(priv);
filep->f_priv = NULL;
return OK;
}
@@ -342,7 +342,7 @@ static int smartfs_closedir(FAR struct fs_dirent_s *dir)
if (priv)
{
- kfree(priv);
+ kmm_free(priv);
}
dir->u.procfs = NULL;
diff --git a/nuttx/fs/smartfs/smartfs_smart.c b/nuttx/fs/smartfs/smartfs_smart.c
index 42878a779..fe398fa68 100644
--- a/nuttx/fs/smartfs/smartfs_smart.c
+++ b/nuttx/fs/smartfs/smartfs_smart.c
@@ -328,11 +328,11 @@ errout_with_buffer:
{
/* Free the space for the name too */
- kfree(sf->entry.name);
+ kmm_free(sf->entry.name);
sf->entry.name = NULL;
}
- kfree(sf);
+ kmm_free(sf);
errout_with_semaphore:
smartfs_semgive(fs);
@@ -423,10 +423,10 @@ static int smartfs_close(FAR struct file *filep)
{
/* Free the space for the name too */
- kfree(sf->entry.name);
+ kmm_free(sf->entry.name);
sf->entry.name = NULL;
}
- kfree(sf);
+ kmm_free(sf);
okout:
smartfs_semgive(fs);
@@ -1143,7 +1143,7 @@ errout_with_semaphore:
if (entry.name != NULL)
{
- kfree(entry.name);
+ kmm_free(entry.name);
entry.name = NULL;
}
@@ -1372,7 +1372,7 @@ static int smartfs_bind(FAR struct inode *blkdriver, const void *data,
ret = smartfs_mount(fs, true);
if (ret != 0)
{
- kfree(fs);
+ kmm_free(fs);
smartfs_semgive(fs);
return ret;
}
@@ -1420,7 +1420,7 @@ static int smartfs_unbind(void *handle, FAR struct inode **blkdriver)
}
smartfs_semgive(fs);
- kfree(fs);
+ kmm_free(fs);
return ret;
}
@@ -1604,7 +1604,7 @@ errout_with_semaphore:
{
/* Free the filename space allocation */
- kfree(entry.name);
+ kmm_free(entry.name);
entry.name = NULL;
}
@@ -1885,13 +1885,13 @@ int smartfs_rename(struct inode *mountpt, const char *oldrelpath,
errout_with_semaphore:
if (oldentry.name != NULL)
{
- kfree(oldentry.name);
+ kmm_free(oldentry.name);
oldentry.name = NULL;
}
if (newentry.name != NULL)
{
- kfree(newentry.name);
+ kmm_free(newentry.name);
newentry.name = NULL;
}
@@ -1967,7 +1967,7 @@ static int smartfs_stat(struct inode *mountpt, const char *relpath, struct stat
errout_with_semaphore:
if (entry.name != NULL)
{
- kfree(entry.name);
+ kmm_free(entry.name);
entry.name = NULL;
}
diff --git a/nuttx/fs/smartfs/smartfs_utils.c b/nuttx/fs/smartfs/smartfs_utils.c
index 3c41ce524..86b43cb09 100644
--- a/nuttx/fs/smartfs/smartfs_utils.c
+++ b/nuttx/fs/smartfs/smartfs_utils.c
@@ -340,8 +340,8 @@ int smartfs_unmount(struct smartfs_mountpt_s *fs)
/* Free the buffers */
- kfree(fs->fs_rwbuffer);
- kfree(fs->fs_workbuffer);
+ kmm_free(fs->fs_rwbuffer);
+ kmm_free(fs->fs_workbuffer);
/* Set the buffer's to invalid value to catch program bugs */
@@ -378,8 +378,8 @@ int smartfs_unmount(struct smartfs_mountpt_s *fs)
/* Release the mountpoint private data */
- kfree(fs->fs_rwbuffer);
- kfree(fs->fs_workbuffer);
+ kmm_free(fs->fs_rwbuffer);
+ kmm_free(fs->fs_workbuffer);
#endif
return ret;