[pnfs] [PATCH] Check for existence of layout in pnfs_return_layout().

Sager, Mike Mike.Sager at netapp.com
Thu Sep 6 15:16:56 EDT 2007


This check is needed when running in a non-pnfs environment.
 
Signed-off-by: Mike Sager <sager at netapp.com>
---
 fs/nfs/pnfs.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
 
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 55be46f..844f68e 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -356,6 +356,9 @@ pnfs_return_layout(struct inode* ino, struct
nfs4_pnfs_layout_segment *range)
 
        dprintk("%s:Begin layout %p\n", __FUNCTION__,
nfsi->current_layout);
 
+       if (nfsi->current_layout == NULL)
+               return 0;
+
        arg.reclaim = 0;
        arg.layout_type = server->pnfs_curr_ld->id;
        arg.return_type = RETURN_FILE;
--
1.5.2.1
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://linux-nfs.org/pipermail/pnfs/attachments/20070906/4c52a1de/attachment.htm 


More information about the pNFS mailing list