mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
9pfs: Convert V9fsFidState::fid_list to QSIMPLEQ
The fid_list is currently open-coded. This doesn't seem to serve any purpose that cannot be met with QEMU's generic lists. Let's go for a QSIMPLEQ : this will allow to add new fids at the end of the list and to improve the logic in v9fs_mark_fids_unreclaim(). Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com> Message-Id: <20210118142300.801516-3-groug@kaod.org> Signed-off-by: Greg Kurz <groug@kaod.org>
This commit is contained in:
parent
2e53160fc6
commit
feabd6cf78
2 changed files with 20 additions and 25 deletions
|
@ -280,7 +280,7 @@ struct V9fsFidState {
|
|||
uid_t uid;
|
||||
int ref;
|
||||
bool clunked;
|
||||
V9fsFidState *next;
|
||||
QSIMPLEQ_ENTRY(V9fsFidState) next;
|
||||
V9fsFidState *rclm_lst;
|
||||
};
|
||||
|
||||
|
@ -339,7 +339,7 @@ typedef struct {
|
|||
struct V9fsState {
|
||||
QLIST_HEAD(, V9fsPDU) free_list;
|
||||
QLIST_HEAD(, V9fsPDU) active_list;
|
||||
V9fsFidState *fid_list;
|
||||
QSIMPLEQ_HEAD(, V9fsFidState) fid_list;
|
||||
FileOperations *ops;
|
||||
FsContext ctx;
|
||||
char *tag;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue