Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218880
b: refs/heads/master
c: 3ecdb3a
h: refs/heads/master
v: v3
  • Loading branch information
Theodore Ts'o committed Oct 28, 2010
1 parent a10a715 commit 777a7bd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 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: cb20d5188366f04d96d2e07b1240cc92170ade40
refs/heads/master: 3ecdb3a193a5f224f084c04a63aa28cdccf4d7d0
24 changes: 13 additions & 11 deletions trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2011,8 +2011,8 @@ static int mpage_da_submit_io(struct mpage_da_data *mpd)
struct inode *inode = mpd->inode;
struct address_space *mapping = inode->i_mapping;
loff_t size = i_size_read(inode);
unsigned int len;
struct buffer_head *page_bufs = NULL;
unsigned int len, block_start;
struct buffer_head *bh, *page_bufs = NULL;
int journal_data = ext4_should_journal_data(inode);

BUG_ON(mpd->next_page <= mpd->first_page);
Expand Down Expand Up @@ -2064,15 +2064,17 @@ static int mpage_da_submit_io(struct mpage_da_data *mpd)
}
commit_write = 1;
}
page_bufs = page_buffers(page);
if (walk_page_buffers(NULL, page_bufs, 0, len, NULL,
ext4_bh_delay_or_unwritten)) {
/*
* We couldn't do block allocation for
* some reason.
*/
goto redirty_page;
}

bh = page_bufs = page_buffers(page);
block_start = 0;
do {
/* redirty page if block allocation undone */
if (!bh || buffer_delay(bh) ||
buffer_unwritten(bh))
goto redirty_page;
bh = bh->b_this_page;
block_start += bh->b_size;
} while ((bh != page_bufs) && (block_start < len));

if (commit_write)
/* mark the buffer_heads as dirty & uptodate */
Expand Down

0 comments on commit 777a7bd

Please sign in to comment.