[PATCH 4/7] SQUASHME: pnfsblock: write_end_cleanup adjust for removed ok_to_use_pnfs

Fred Isaman
2010-06-11T07:40:56Z

fs/nfs/blocklayout/blocklayout.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index b1df445..43a5617 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -1048,9 +1048,13 @@ bl_write_end_cleanup(struct file *filp, struct pnfs_fsdata *fsdata)
sector_t *pos;
struct address_space *mapping = filp->f_mapping;
struct pnfs_fsdata *fake_data;
+ struct pnfs_layout_segment *lseg;

if (!fsdata)
return;
+ lseg = fsdata->lseg;
+ if (!lseg)
+ return;
pos = fsdata->private;
if (!pos)
return;
@@ -1079,7 +1083,8 @@ bl_write_end_cleanup(struct file *filp, struct pnfs_fsdata *fsdata)
unlock_page(page);
continue;
}
- fake_data->ok_to_use_pnfs = 1;
+ get_lseg(lseg);
+ fake_data->lseg = lseg;
fake_data->bypass_eof = 1;
mapping->a_ops->write_end(filp, mapping,
index << PAGE_CACHE_SHIFT,
--
1.6.6.1