diff --git a/fs/inode/fs_files.c b/fs/inode/fs_files.c index 8374ad06d3041..c2268bb9e53cf 100644 --- a/fs/inode/fs_files.c +++ b/fs/inode/fs_files.c @@ -379,7 +379,6 @@ void files_initlist(FAR struct filelist *list) */ list->fl_rows = 1; - list->fl_crefs = 1; list->fl_files = &list->fl_prefile; list->fl_prefile = list->fl_prefiles; spin_lock_init(&list->fl_lock); @@ -457,34 +456,6 @@ void files_dumplist(FAR struct filelist *list) } #endif -/**************************************************************************** - * Name: files_getlist - * - * Description: - * Get the list of files by tcb. - * - * Assumptions: - * Called during task deletion in a safe context. - * - ****************************************************************************/ - -FAR struct filelist *files_getlist(FAR struct tcb_s *tcb) -{ - FAR struct filelist *list; - - if (tcb->group != NULL) - { - list = &tcb->group->tg_filelist; - if (list->fl_crefs > 0) - { - list->fl_crefs++; - return list; - } - } - - return NULL; -} - /**************************************************************************** * Name: files_putlist * @@ -501,12 +472,6 @@ void files_putlist(FAR struct filelist *list) int i; int j; - DEBUGASSERT(list->fl_crefs >= 1); - if (--list->fl_crefs > 0) - { - return; - } - /* Close each file descriptor .. Normally, you would need take the list * mutex, but it is safe to ignore the mutex in this context * because there should not be any references in this context. diff --git a/include/nuttx/fs/fs.h b/include/nuttx/fs/fs.h index e82df41bffea5..31e2158b264b7 100644 --- a/include/nuttx/fs/fs.h +++ b/include/nuttx/fs/fs.h @@ -494,7 +494,6 @@ struct filelist { spinlock_t fl_lock; /* Manage access to the file list */ uint8_t fl_rows; /* The number of rows of fl_files array */ - uint8_t fl_crefs; /* The references to filelist */ FAR struct file **fl_files; /* The pointer of two layer file descriptors array */ /* Pre-allocated files to avoid allocator access during thread creation @@ -906,16 +905,6 @@ void files_dumplist(FAR struct filelist *list); # define files_dumplist(l) #endif -/**************************************************************************** - * Name: files_getlist - * - * Description: - * Get the list of files by tcb. - * - ****************************************************************************/ - -FAR struct filelist *files_getlist(FAR struct tcb_s *tcb); - /**************************************************************************** * Name: files_putlist * diff --git a/tools/gdb/nuttxgdb/protocols/fs.py b/tools/gdb/nuttxgdb/protocols/fs.py index aa67bb9245e34..787bcb578bf4c 100644 --- a/tools/gdb/nuttxgdb/protocols/fs.py +++ b/tools/gdb/nuttxgdb/protocols/fs.py @@ -60,5 +60,4 @@ class FileList(Value): """struct filelist_s""" fl_rows: Value - fl_crefs: Value fl_files: Value