scoutfs: actually initialize per_task entry head

We had callers using the initialization macro, it just didn't do
anything.  The uninitialized entries triggered a bug on trying to delete
an uninitialized entry.  fsx-mpi tripped over this on shutdown after
seeing a consistency error.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2017-10-19 13:10:30 -07:00
committed by Mark Fasheh
parent 95d8f4bf20
commit 4263a22c15

View File

@@ -12,8 +12,11 @@ struct scoutfs_per_task_entry {
void *ptr;
};
#define SCOUTFS_DECLARE_PER_TASK_ENTRY(name) \
struct scoutfs_per_task_entry name
#define SCOUTFS_DECLARE_PER_TASK_ENTRY(name) \
struct scoutfs_per_task_entry name = { \
.head = LIST_HEAD_INIT((name).head), \
}
void *scoutfs_per_task_get(struct scoutfs_per_task *pt);
void scoutfs_per_task_add(struct scoutfs_per_task *pt,