Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33255
b: refs/heads/master
c: b4c76fa
h: refs/heads/master
i:
  33253: 392a3a4
  33251: 9506e95
  33247: ab5ba3c
v: v3
  • Loading branch information
Chris Mason authored and Linus Torvalds committed Aug 6, 2006
1 parent c4553bb commit 1043504
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 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: b5f3953c10b27fcd1c83e199e573b41d8327e22e
refs/heads/master: b4c76fa721c7c8a43655a74e508870d21d2e26d3
14 changes: 12 additions & 2 deletions trunk/fs/reiserfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2340,6 +2340,7 @@ static int reiserfs_write_full_page(struct page *page,
unsigned long end_index = inode->i_size >> PAGE_CACHE_SHIFT;
int error = 0;
unsigned long block;
sector_t last_block;
struct buffer_head *head, *bh;
int partial = 0;
int nr = 0;
Expand Down Expand Up @@ -2387,10 +2388,19 @@ static int reiserfs_write_full_page(struct page *page,
}
bh = head;
block = page->index << (PAGE_CACHE_SHIFT - s->s_blocksize_bits);
last_block = (i_size_read(inode) - 1) >> inode->i_blkbits;
/* first map all the buffers, logging any direct items we find */
do {
if ((checked || buffer_dirty(bh)) && (!buffer_mapped(bh) ||
(buffer_mapped(bh)
if (block > last_block) {
/*
* This can happen when the block size is less than
* the page size. The corresponding bytes in the page
* were zero filled above
*/
clear_buffer_dirty(bh);
set_buffer_uptodate(bh);
} else if ((checked || buffer_dirty(bh)) &&
(!buffer_mapped(bh) || (buffer_mapped(bh)
&& bh->b_blocknr ==
0))) {
/* not mapped yet, or it points to a direct item, search
Expand Down

0 comments on commit 1043504

Please sign in to comment.