diff options
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r-- | fs/ext4/extents.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 78beb096f57d..85287742f2ae 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/fs.h> | 33 | #include <linux/fs.h> |
34 | #include <linux/time.h> | 34 | #include <linux/time.h> |
35 | #include <linux/ext4_jbd2.h> | 35 | #include <linux/ext4_jbd2.h> |
36 | #include <linux/jbd.h> | 36 | #include <linux/jbd2.h> |
37 | #include <linux/highuid.h> | 37 | #include <linux/highuid.h> |
38 | #include <linux/pagemap.h> | 38 | #include <linux/pagemap.h> |
39 | #include <linux/quotaops.h> | 39 | #include <linux/quotaops.h> |
@@ -52,7 +52,7 @@ static ext4_fsblk_t ext_pblock(struct ext4_extent *ex) | |||
52 | { | 52 | { |
53 | ext4_fsblk_t block; | 53 | ext4_fsblk_t block; |
54 | 54 | ||
55 | block = le32_to_cpu(ex->ee_start); | 55 | block = le32_to_cpu(ex->ee_start_lo); |
56 | block |= ((ext4_fsblk_t) le16_to_cpu(ex->ee_start_hi) << 31) << 1; | 56 | block |= ((ext4_fsblk_t) le16_to_cpu(ex->ee_start_hi) << 31) << 1; |
57 | return block; | 57 | return block; |
58 | } | 58 | } |
@@ -65,7 +65,7 @@ static ext4_fsblk_t idx_pblock(struct ext4_extent_idx *ix) | |||
65 | { | 65 | { |
66 | ext4_fsblk_t block; | 66 | ext4_fsblk_t block; |
67 | 67 | ||
68 | block = le32_to_cpu(ix->ei_leaf); | 68 | block = le32_to_cpu(ix->ei_leaf_lo); |
69 | block |= ((ext4_fsblk_t) le16_to_cpu(ix->ei_leaf_hi) << 31) << 1; | 69 | block |= ((ext4_fsblk_t) le16_to_cpu(ix->ei_leaf_hi) << 31) << 1; |
70 | return block; | 70 | return block; |
71 | } | 71 | } |
@@ -77,7 +77,7 @@ static ext4_fsblk_t idx_pblock(struct ext4_extent_idx *ix) | |||
77 | */ | 77 | */ |
78 | static void ext4_ext_store_pblock(struct ext4_extent *ex, ext4_fsblk_t pb) | 78 | static void ext4_ext_store_pblock(struct ext4_extent *ex, ext4_fsblk_t pb) |
79 | { | 79 | { |
80 | ex->ee_start = cpu_to_le32((unsigned long) (pb & 0xffffffff)); | 80 | ex->ee_start_lo = cpu_to_le32((unsigned long) (pb & 0xffffffff)); |
81 | ex->ee_start_hi = cpu_to_le16((unsigned long) ((pb >> 31) >> 1) & 0xffff); | 81 | ex->ee_start_hi = cpu_to_le16((unsigned long) ((pb >> 31) >> 1) & 0xffff); |
82 | } | 82 | } |
83 | 83 | ||
@@ -88,7 +88,7 @@ static void ext4_ext_store_pblock(struct ext4_extent *ex, ext4_fsblk_t pb) | |||
88 | */ | 88 | */ |
89 | static void ext4_idx_store_pblock(struct ext4_extent_idx *ix, ext4_fsblk_t pb) | 89 | static void ext4_idx_store_pblock(struct ext4_extent_idx *ix, ext4_fsblk_t pb) |
90 | { | 90 | { |
91 | ix->ei_leaf = cpu_to_le32((unsigned long) (pb & 0xffffffff)); | 91 | ix->ei_leaf_lo = cpu_to_le32((unsigned long) (pb & 0xffffffff)); |
92 | ix->ei_leaf_hi = cpu_to_le16((unsigned long) ((pb >> 31) >> 1) & 0xffff); | 92 | ix->ei_leaf_hi = cpu_to_le16((unsigned long) ((pb >> 31) >> 1) & 0xffff); |
93 | } | 93 | } |
94 | 94 | ||
@@ -1409,8 +1409,7 @@ has_space: | |||
1409 | eh->eh_entries = cpu_to_le16(le16_to_cpu(eh->eh_entries)+1); | 1409 | eh->eh_entries = cpu_to_le16(le16_to_cpu(eh->eh_entries)+1); |
1410 | nearex = path[depth].p_ext; | 1410 | nearex = path[depth].p_ext; |
1411 | nearex->ee_block = newext->ee_block; | 1411 | nearex->ee_block = newext->ee_block; |
1412 | nearex->ee_start = newext->ee_start; | 1412 | ext4_ext_store_pblock(nearex, ext_pblock(newext)); |
1413 | nearex->ee_start_hi = newext->ee_start_hi; | ||
1414 | nearex->ee_len = newext->ee_len; | 1413 | nearex->ee_len = newext->ee_len; |
1415 | 1414 | ||
1416 | merge: | 1415 | merge: |
@@ -2177,7 +2176,6 @@ int ext4_ext_convert_to_initialized(handle_t *handle, struct inode *inode, | |||
2177 | } | 2176 | } |
2178 | /* ex2: iblock to iblock + maxblocks-1 : initialised */ | 2177 | /* ex2: iblock to iblock + maxblocks-1 : initialised */ |
2179 | ex2->ee_block = cpu_to_le32(iblock); | 2178 | ex2->ee_block = cpu_to_le32(iblock); |
2180 | ex2->ee_start = cpu_to_le32(newblock); | ||
2181 | ext4_ext_store_pblock(ex2, newblock); | 2179 | ext4_ext_store_pblock(ex2, newblock); |
2182 | ex2->ee_len = cpu_to_le16(allocated); | 2180 | ex2->ee_len = cpu_to_le16(allocated); |
2183 | if (ex2 != ex) | 2181 | if (ex2 != ex) |