aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/objlayout/objlayout.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/objlayout/objlayout.c')
-rw-r--r--fs/nfs/objlayout/objlayout.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/fs/nfs/objlayout/objlayout.c b/fs/nfs/objlayout/objlayout.c
index 10e5fca3b7fb..f14b4da34052 100644
--- a/fs/nfs/objlayout/objlayout.c
+++ b/fs/nfs/objlayout/objlayout.c
@@ -42,6 +42,32 @@
42 42
43#define NFSDBG_FACILITY NFSDBG_PNFS_LD 43#define NFSDBG_FACILITY NFSDBG_PNFS_LD
44/* 44/*
45 * Create a objlayout layout structure for the given inode and return it.
46 */
47struct pnfs_layout_hdr *
48objlayout_alloc_layout_hdr(struct inode *inode, gfp_t gfp_flags)
49{
50 struct objlayout *objlay;
51
52 objlay = kzalloc(sizeof(struct objlayout), gfp_flags);
53 dprintk("%s: Return %p\n", __func__, objlay);
54 return &objlay->pnfs_layout;
55}
56
57/*
58 * Free an objlayout layout structure
59 */
60void
61objlayout_free_layout_hdr(struct pnfs_layout_hdr *lo)
62{
63 struct objlayout *objlay = OBJLAYOUT(lo);
64
65 dprintk("%s: objlay %p\n", __func__, objlay);
66
67 kfree(objlay);
68}
69
70/*
45 * Unmarshall layout and store it in pnfslay. 71 * Unmarshall layout and store it in pnfslay.
46 */ 72 */
47struct pnfs_layout_segment * 73struct pnfs_layout_segment *