[pnfs] [PATCH 14/37] pnfs: initialize pnfs_layout_type generic fields in pnfs layer

Benny Halevy bhalevy at panasas.com
Tue Jan 1 05:50:22 EST 2008


Signed-off-by: Benny Halevy <bhalevy at panasas.com>
---
 fs/nfs/nfs4filelayout.c |    1 -
 fs/nfs/pnfs.c           |    2 ++
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 9edf175..93b2abc 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -422,7 +422,6 @@ filelayout_alloc_layout(struct pnfs_mount_type *mountid, struct inode *inode)
 		return NULL;
 
 	pnfslay->layoutid = (void *)nfslay;
-	pnfslay->inode = inode;
 	return pnfslay;
 }
 
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 9abd263..fdb3d40 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -430,6 +430,8 @@ pnfs_inject_layout(struct nfs_inode *nfsi,
 	if (nfsi->current_layout == NULL) {
 		dprintk("%s Alloc'ing layout\n", __FUNCTION__);
 		layid = io_ops->alloc_layout(server->pnfs_mountid, inode);
+		if (layid)
+			layid->inode = inode;
 	} else {
 		dprintk("%s Adding to current layout\n", __FUNCTION__);
 		layid = nfsi->current_layout;
-- 
1.5.3.3



More information about the pNFS mailing list