Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18177
b: refs/heads/master
c: 7336cea
h: refs/heads/master
i:
  18175: 5b44cf7
v: v3
  • Loading branch information
Christoph Hellwig authored and Nathan Scott committed Jan 11, 2006
1 parent 3c6fc56 commit aaaeaf4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 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: d5cb48aaac5bba1721bce3232e6fb022ade2c0b7
refs/heads/master: 7336cea8c2737bbaf0296d67782f760828301d56
18 changes: 6 additions & 12 deletions trunk/fs/xfs/linux-2.6/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ STATIC void
xfs_add_to_ioend(
struct inode *inode,
struct buffer_head *bh,
unsigned int p_offset,
xfs_off_t offset,
unsigned int type,
xfs_ioend_t **result,
int need_ioend)
Expand All @@ -423,10 +423,7 @@ xfs_add_to_ioend(

if (!ioend || need_ioend || type != ioend->io_type) {
xfs_ioend_t *previous = *result;
xfs_off_t offset;

offset = (xfs_off_t)bh->b_page->index << PAGE_CACHE_SHIFT;
offset += p_offset;
ioend = xfs_alloc_ioend(inode, type);
ioend->io_offset = offset;
ioend->io_buffer_head = bh;
Expand Down Expand Up @@ -666,7 +663,6 @@ xfs_convert_page(
p_offset = p_offset ? roundup(p_offset, len) : PAGE_CACHE_SIZE;
page_dirty = p_offset / len;

p_offset = 0;
bh = head = page_buffers(page);
do {
if (offset >= end_offset)
Expand Down Expand Up @@ -694,7 +690,7 @@ xfs_convert_page(

xfs_map_at_offset(bh, offset, bbits, mp);
if (startio) {
xfs_add_to_ioend(inode, bh, p_offset,
xfs_add_to_ioend(inode, bh, offset,
type, ioendp, done);
} else {
set_buffer_dirty(bh);
Expand All @@ -707,16 +703,15 @@ xfs_convert_page(
type = 0;
if (buffer_mapped(bh) && all_bh && startio) {
lock_buffer(bh);
xfs_add_to_ioend(inode, bh, p_offset,
xfs_add_to_ioend(inode, bh, offset,
type, ioendp, done);
count++;
page_dirty--;
} else {
done = 1;
}
}
} while (offset += len, p_offset += len,
(bh = bh->b_this_page) != head);
} while (offset += len, (bh = bh->b_this_page) != head);

if (uptodate && bh == head)
SetPageUptodate(page);
Expand Down Expand Up @@ -914,7 +909,7 @@ xfs_page_state_convert(
xfs_map_at_offset(bh, offset,
inode->i_blkbits, &iomap);
if (startio) {
xfs_add_to_ioend(inode, bh, p_offset,
xfs_add_to_ioend(inode, bh, offset,
type, &ioend,
!iomap_valid);
} else {
Expand All @@ -930,8 +925,7 @@ xfs_page_state_convert(

if (!test_and_set_bit(BH_Lock, &bh->b_state)) {
ASSERT(buffer_mapped(bh));
xfs_add_to_ioend(inode,
bh, p_offset, type,
xfs_add_to_ioend(inode, bh, offset, type,
&ioend, !iomap_valid);
page_dirty--;
count++;
Expand Down

0 comments on commit aaaeaf4

Please sign in to comment.