@@ -541,10 +541,15 @@ release_extents(struct pnfs_block_layout *bl,
spin_unlock(&bl->bl_ext_lock);
}
-/* STUB */
static void
-release_inval_marks(void)
+release_inval_marks(struct pnfs_inval_markings *marks)
{
+ struct pnfs_inval_tracking *pos, *temp;
+
+ list_for_each_entry_safe(pos, temp, &marks->im_tree.mtt_stub, it_link) {
+ list_del(&pos->it_link);
+ kfree(pos);
+ }
return;
}
@@ -556,7 +561,7 @@ bl_free_layout(void *p)
dprintk("%s enter\n", __func__);
release_extents(bl, NULL);
- release_inval_marks();
+ release_inval_marks(&bl->bl_inval);
kfree(bl);
return;
}
@@ -126,6 +126,12 @@ struct pnfs_inval_markings {
sector_t im_block_size; /* Server blocksize in sectors */
};
+struct pnfs_inval_tracking {
+ struct list_head it_link;
+ int it_sector;
+ int it_tags;
+};
+
/* sector_t fields are all in 512-byte sectors */
struct pnfs_block_extent {
struct kref be_refcnt;
@@ -40,12 +40,6 @@
#define INTERNAL_EXISTS MY_MAX_TAGS
#define INTERNAL_MASK ((1 << INTERNAL_EXISTS) - 1)
-struct pnfs_inval_tracking {
- struct list_head it_link;
- int it_sector;
- int it_tags;
-};
-
/* Returns largest t<=s s.t. t%base==0 */
static inline sector_t normalize(sector_t s, int base)
{