diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2008-04-28 05:16:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:46 -0400 |
commit | 9e902df6be2cb7444e5a0f7e2e72bcbf3b978f3e (patch) | |
tree | 18097b73e7dff21688f4c9fee8bc785c63a19766 /fs/reiserfs/objectid.c | |
parent | 78e917d59c30c3d5a4cda7f47e0f40f1c98f9b02 (diff) |
reiserfs: le*_add_cpu conversion
replace all:
little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) +
expression_in_cpu_byteorder);
with:
leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder);
generated with semantic patch
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/reiserfs/objectid.c')
-rw-r--r-- | fs/reiserfs/objectid.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/reiserfs/objectid.c b/fs/reiserfs/objectid.c index 65feba4deb69..f0c154372f50 100644 --- a/fs/reiserfs/objectid.c +++ b/fs/reiserfs/objectid.c | |||
@@ -114,7 +114,7 @@ void reiserfs_release_objectid(struct reiserfs_transaction_handle *th, | |||
114 | if (objectid_to_release == le32_to_cpu(map[i])) { | 114 | if (objectid_to_release == le32_to_cpu(map[i])) { |
115 | /* This incrementation unallocates the objectid. */ | 115 | /* This incrementation unallocates the objectid. */ |
116 | //map[i]++; | 116 | //map[i]++; |
117 | map[i] = cpu_to_le32(le32_to_cpu(map[i]) + 1); | 117 | le32_add_cpu(&map[i], 1); |
118 | 118 | ||
119 | /* Did we unallocate the last member of an odd sequence, and can shrink oids? */ | 119 | /* Did we unallocate the last member of an odd sequence, and can shrink oids? */ |
120 | if (map[i] == map[i + 1]) { | 120 | if (map[i] == map[i + 1]) { |
@@ -138,8 +138,7 @@ void reiserfs_release_objectid(struct reiserfs_transaction_handle *th, | |||
138 | /* size of objectid map is not changed */ | 138 | /* size of objectid map is not changed */ |
139 | if (objectid_to_release + 1 == le32_to_cpu(map[i + 1])) { | 139 | if (objectid_to_release + 1 == le32_to_cpu(map[i + 1])) { |
140 | //objectid_map[i+1]--; | 140 | //objectid_map[i+1]--; |
141 | map[i + 1] = | 141 | le32_add_cpu(&map[i + 1], -1); |
142 | cpu_to_le32(le32_to_cpu(map[i + 1]) - 1); | ||
143 | return; | 142 | return; |
144 | } | 143 | } |
145 | 144 | ||