From 9f285c9db91c931181609645b7d042a2ae7f55f4 Mon Sep 17 00:00:00 2001 From: braam Date: Sat, 22 Jun 2002 17:13:54 +0000 Subject: [PATCH] Page must be mapped before prepare write, since on ENOSPACE we fall into lustre_put_page and do kunmap (this crashes on highmem machines if the page wasn't mapped). --- lustre/obdfilter/filter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 49e46b0..8148df7 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -1096,6 +1096,7 @@ struct page *filter_get_page_write(struct inode *inode, unsigned long index, * a no-op for most filesystems, because we write the whole * page. For partial-page I/O this will read in the page. */ + kmap(page); rc = mapping->a_ops->prepare_write(NULL, page, 0, PAGE_SIZE); if (rc) { CERROR("page index %lu, rc = %d\n", index, rc); @@ -1109,8 +1110,6 @@ struct page *filter_get_page_write(struct inode *inode, unsigned long index, LBUG(); GOTO(err_unlock, rc = -EIO); } - - kmap(page); } return page; -- 1.8.3.1