Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233178
b: refs/heads/master
c: d50bdd5
h: refs/heads/master
v: v3
  • Loading branch information
Curt Wohlgemuth authored and Theodore Ts'o committed Feb 7, 2011
1 parent c9a55d6 commit 1dbd262
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd68314ccf3fb918c1fb6471817edbc60ece4b52
refs/heads/master: d50bdd5aa55127635fd8a5c74bd2abb256bd34e3
11 changes: 6 additions & 5 deletions trunk/fs/ext4/page-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ static void ext4_end_bio(struct bio *bio, int error)
struct inode *inode;
unsigned long flags;
int i;
sector_t bi_sector = bio->bi_sector;

BUG_ON(!io_end);
bio->bi_private = NULL;
Expand All @@ -207,9 +208,7 @@ static void ext4_end_bio(struct bio *bio, int error)
if (error)
SetPageError(page);
BUG_ON(!head);
if (head->b_size == PAGE_CACHE_SIZE)
clear_buffer_dirty(head);
else {
if (head->b_size != PAGE_CACHE_SIZE) {
loff_t offset;
loff_t io_end_offset = io_end->offset + io_end->size;

Expand All @@ -221,7 +220,6 @@ static void ext4_end_bio(struct bio *bio, int error)
if (error)
buffer_io_error(bh);

clear_buffer_dirty(bh);
}
if (buffer_delay(bh))
partial_write = 1;
Expand Down Expand Up @@ -257,7 +255,7 @@ static void ext4_end_bio(struct bio *bio, int error)
(unsigned long long) io_end->offset,
(long) io_end->size,
(unsigned long long)
bio->bi_sector >> (inode->i_blkbits - 9));
bi_sector >> (inode->i_blkbits - 9));
}

/* Add the io_end to per-inode completed io list*/
Expand Down Expand Up @@ -380,6 +378,7 @@ int ext4_bio_write_page(struct ext4_io_submit *io,

blocksize = 1 << inode->i_blkbits;

BUG_ON(!PageLocked(page));
BUG_ON(PageWriteback(page));
set_page_writeback(page);
ClearPageError(page);
Expand All @@ -397,12 +396,14 @@ int ext4_bio_write_page(struct ext4_io_submit *io,
for (bh = head = page_buffers(page), block_start = 0;
bh != head || !block_start;
block_start = block_end, bh = bh->b_this_page) {

block_end = block_start + blocksize;
if (block_start >= len) {
clear_buffer_dirty(bh);
set_buffer_uptodate(bh);
continue;
}
clear_buffer_dirty(bh);
ret = io_submit_add_bh(io, io_page, inode, wbc, bh);
if (ret) {
/*
Expand Down

0 comments on commit 1dbd262

Please sign in to comment.