diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-06-12 11:36:58 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-06-12 11:36:58 -0400 |
commit | 340887809d92a4dd6c71caa97d658cef32c098c3 (patch) | |
tree | 4767f84fa4b066ac57c5df15741bda47766fe8ce /fs/btrfs/file.c | |
parent | 6cbd55707802b98843f953d1ae6d8f5bcd9a76c0 (diff) |
Btrfs: i386 fixes from axboe
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 566e526b60ff..83836fb3d4e9 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -112,7 +112,7 @@ static int dirty_and_release_pages(struct btrfs_trans_handle *trans, | |||
112 | if (buffer_mapped(bh) && bh->b_blocknr == 0) { | 112 | if (buffer_mapped(bh) && bh->b_blocknr == 0) { |
113 | struct btrfs_key key; | 113 | struct btrfs_key key; |
114 | struct btrfs_path *path; | 114 | struct btrfs_path *path; |
115 | char *ptr; | 115 | char *ptr, *kaddr; |
116 | u32 datasize; | 116 | u32 datasize; |
117 | 117 | ||
118 | /* create an inline extent, and copy the data in */ | 118 | /* create an inline extent, and copy the data in */ |
@@ -135,8 +135,11 @@ static int dirty_and_release_pages(struct btrfs_trans_handle *trans, | |||
135 | btrfs_set_file_extent_type(ei, | 135 | btrfs_set_file_extent_type(ei, |
136 | BTRFS_FILE_EXTENT_INLINE); | 136 | BTRFS_FILE_EXTENT_INLINE); |
137 | ptr = btrfs_file_extent_inline_start(ei); | 137 | ptr = btrfs_file_extent_inline_start(ei); |
138 | kaddr = kmap_atomic(bh->b_page, KM_USER0); | ||
138 | btrfs_memcpy(root, path->nodes[0]->b_data, | 139 | btrfs_memcpy(root, path->nodes[0]->b_data, |
139 | ptr, bh->b_data, offset + write_bytes); | 140 | ptr, kaddr + bh_offset(bh), |
141 | offset + write_bytes); | ||
142 | kunmap_atomic(kaddr, KM_USER0); | ||
140 | mark_buffer_dirty(path->nodes[0]); | 143 | mark_buffer_dirty(path->nodes[0]); |
141 | btrfs_free_path(path); | 144 | btrfs_free_path(path); |
142 | } else if (buffer_mapped(bh)) { | 145 | } else if (buffer_mapped(bh)) { |