git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Avoid taking global tasklist_lock for single threadedprocess at getrusage()
[safe/jmp/linux-2.6]
/
fs
/
mpage.c
diff --git
a/fs/mpage.c
b/fs/mpage.c
index
b92c0e6
..
e431cb3
100644
(file)
--- a/
fs/mpage.c
+++ b/
fs/mpage.c
@@
-79,8
+79,11
@@
static int mpage_end_io_write(struct bio *bio, unsigned int bytes_done, int err)
if (--bvec >= bio->bi_io_vec)
prefetchw(&bvec->bv_page->flags);
if (--bvec >= bio->bi_io_vec)
prefetchw(&bvec->bv_page->flags);
- if (!uptodate)
+ if (!uptodate)
{
SetPageError(page);
SetPageError(page);
+ if (page->mapping)
+ set_bit(AS_EIO, &page->mapping->flags);
+ }
end_page_writeback(page);
} while (bvec >= bio->bi_io_vec);
bio_put(bio);
end_page_writeback(page);
} while (bvec >= bio->bi_io_vec);
bio_put(bio);
@@
-99,7
+102,7
@@
static struct bio *mpage_bio_submit(int rw, struct bio *bio)
static struct bio *
mpage_alloc(struct block_device *bdev,
sector_t first_sector, int nr_vecs,
static struct bio *
mpage_alloc(struct block_device *bdev,
sector_t first_sector, int nr_vecs,
-
unsigned int __nocas
t gfp_flags)
+
gfp_
t gfp_flags)
{
struct bio *bio;
{
struct bio *bio;
@@
-181,7
+184,7
@@
do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages,
if (page_has_buffers(page))
goto confused;
if (page_has_buffers(page))
goto confused;
- block_in_file = page->index << (PAGE_CACHE_SHIFT - blkbits);
+ block_in_file =
(sector_t)
page->index << (PAGE_CACHE_SHIFT - blkbits);
last_block = (i_size_read(inode) + blocksize - 1) >> blkbits;
bh.b_page = page;
last_block = (i_size_read(inode) + blocksize - 1) >> blkbits;
bh.b_page = page;
@@
-463,7
+466,7
@@
__mpage_writepage(struct bio *bio, struct page *page, get_block_t get_block,
* The page has no buffers: map it to disk
*/
BUG_ON(!PageUptodate(page));
* The page has no buffers: map it to disk
*/
BUG_ON(!PageUptodate(page));
- block_in_file = page->index << (PAGE_CACHE_SHIFT - blkbits);
+ block_in_file =
(sector_t)
page->index << (PAGE_CACHE_SHIFT - blkbits);
last_block = (i_size - 1) >> blkbits;
map_bh.b_page = page;
for (page_block = 0; page_block < blocks_per_page; ) {
last_block = (i_size - 1) >> blkbits;
map_bh.b_page = page;
for (page_block = 0; page_block < blocks_per_page; ) {
@@
-718,7
+721,7
@@
retry:
&last_block_in_bio, &ret, wbc,
page->mapping->a_ops->writepage);
}
&last_block_in_bio, &ret, wbc,
page->mapping->a_ops->writepage);
}
- if (unlikely(ret == WRITEPAGE_ACTIVATE))
+ if (unlikely(ret ==
AOP_
WRITEPAGE_ACTIVATE))
unlock_page(page);
if (ret || (--(wbc->nr_to_write) <= 0))
done = 1;
unlock_page(page);
if (ret || (--(wbc->nr_to_write) <= 0))
done = 1;