diff options
| author | David S. Miller <davem@davemloft.net> | 2010-10-21 11:43:05 -0400 | 
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-10-21 11:43:05 -0400 | 
| commit | 2198a10b501fd4443430cb17e065a9e859cc58c9 (patch) | |
| tree | 87f3781d293da0f8f8f61615905eb7bf62b7c128 /fs/exofs/inode.c | |
| parent | 9941fb62762253774cc6177d0b9172ece5133fe1 (diff) | |
| parent | db5a753bf198ef7a50e17d2ff358adf37efe8648 (diff) | |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	net/core/dev.c
Diffstat (limited to 'fs/exofs/inode.c')
| -rw-r--r-- | fs/exofs/inode.c | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index eb7368ebd8cd..3eadd97324b1 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c  | |||
| @@ -54,6 +54,9 @@ struct page_collect { | |||
| 54 | unsigned nr_pages; | 54 | unsigned nr_pages; | 
| 55 | unsigned long length; | 55 | unsigned long length; | 
| 56 | loff_t pg_first; /* keep 64bit also in 32-arches */ | 56 | loff_t pg_first; /* keep 64bit also in 32-arches */ | 
| 57 | bool read_4_write; /* This means two things: that the read is sync | ||
| 58 | * And the pages should not be unlocked. | ||
| 59 | */ | ||
| 57 | }; | 60 | }; | 
| 58 | 61 | ||
| 59 | static void _pcol_init(struct page_collect *pcol, unsigned expected_pages, | 62 | static void _pcol_init(struct page_collect *pcol, unsigned expected_pages, | 
| @@ -71,6 +74,7 @@ static void _pcol_init(struct page_collect *pcol, unsigned expected_pages, | |||
| 71 | pcol->nr_pages = 0; | 74 | pcol->nr_pages = 0; | 
| 72 | pcol->length = 0; | 75 | pcol->length = 0; | 
| 73 | pcol->pg_first = -1; | 76 | pcol->pg_first = -1; | 
| 77 | pcol->read_4_write = false; | ||
| 74 | } | 78 | } | 
| 75 | 79 | ||
| 76 | static void _pcol_reset(struct page_collect *pcol) | 80 | static void _pcol_reset(struct page_collect *pcol) | 
| @@ -347,7 +351,8 @@ static int readpage_strip(void *data, struct page *page) | |||
| 347 | if (PageError(page)) | 351 | if (PageError(page)) | 
| 348 | ClearPageError(page); | 352 | ClearPageError(page); | 
| 349 | 353 | ||
| 350 | unlock_page(page); | 354 | if (!pcol->read_4_write) | 
| 355 | unlock_page(page); | ||
| 351 | EXOFS_DBGMSG("readpage_strip(0x%lx, 0x%lx) empty page," | 356 | EXOFS_DBGMSG("readpage_strip(0x%lx, 0x%lx) empty page," | 
| 352 | " splitting\n", inode->i_ino, page->index); | 357 | " splitting\n", inode->i_ino, page->index); | 
| 353 | 358 | ||
| @@ -428,6 +433,7 @@ static int _readpage(struct page *page, bool is_sync) | |||
| 428 | /* readpage_strip might call read_exec(,is_sync==false) at several | 433 | /* readpage_strip might call read_exec(,is_sync==false) at several | 
| 429 | * places but not if we have a single page. | 434 | * places but not if we have a single page. | 
| 430 | */ | 435 | */ | 
| 436 | pcol.read_4_write = is_sync; | ||
| 431 | ret = readpage_strip(&pcol, page); | 437 | ret = readpage_strip(&pcol, page); | 
| 432 | if (ret) { | 438 | if (ret) { | 
| 433 | EXOFS_ERR("_readpage => %d\n", ret); | 439 | EXOFS_ERR("_readpage => %d\n", ret); | 
