[pnfs] [PATCH 11/28] pnfsblock: layout alloc and free
Fred Isaman
iisaman at citi.umich.edu
Tue Mar 11 15:31:52 EDT 2008
This needs to be rethought. Currently I am just porting old patches
to new framework by putting everything that was in pnfs_layout_type
into pnfs_layout_segment.
Signed-off-by: Fred Isaman <iisaman at citi.umich.edu>
---
fs/nfs/blocklayout/blocklayout.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 787717b..8c5fbd2 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -89,17 +89,22 @@ bl_write_pagelist(struct pnfs_layout_type *layoutid,
}
static void
-bl_free_layout(struct pnfs_layout_type *layoutid)
+bl_free_layout(struct pnfs_layout_type *lt)
{
dprintk("%s enter\n", __func__);
+ kfree(lt);
return;
}
+/* XXX Ignoring ld_data for the moment */
static struct pnfs_layout_type *
bl_alloc_layout(struct pnfs_mount_type *mtype, struct inode *inode)
{
+ struct pnfs_layout_type *lt;
+
dprintk("%s enter\n", __func__);
- return NULL;
+ lt = kzalloc(sizeof(*lt) + 0, GFP_KERNEL);
+ return lt;
}
static void
--
1.5.3.3
More information about the pNFS
mailing list