diff options
author | Igor Mammedov <niallain@gmail.com> | 2008-04-28 19:08:21 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-04-28 19:08:21 -0400 |
commit | e9f20d6f03e8df393b001dab6dc5226c2a5daf57 (patch) | |
tree | 73e94fa5e4f83576c97e36187b809c5aad2ade30 /fs/reiserfs/objectid.c | |
parent | bf62fd887cab230f5952b611bde25e8e15acb454 (diff) | |
parent | e31a94ed371c70855eb30b77c490d6d85dd4da26 (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/reiserfs/objectid.c')
-rw-r--r-- | fs/reiserfs/objectid.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/reiserfs/objectid.c b/fs/reiserfs/objectid.c index 65feba4deb69..ea0cf8c28a99 100644 --- a/fs/reiserfs/objectid.c +++ b/fs/reiserfs/objectid.c | |||
@@ -61,7 +61,7 @@ __u32 reiserfs_get_unused_objectid(struct reiserfs_transaction_handle *th) | |||
61 | /* comment needed -Hans */ | 61 | /* comment needed -Hans */ |
62 | unused_objectid = le32_to_cpu(map[1]); | 62 | unused_objectid = le32_to_cpu(map[1]); |
63 | if (unused_objectid == U32_MAX) { | 63 | if (unused_objectid == U32_MAX) { |
64 | reiserfs_warning(s, "%s: no more object ids", __FUNCTION__); | 64 | reiserfs_warning(s, "%s: no more object ids", __func__); |
65 | reiserfs_restore_prepared_buffer(s, SB_BUFFER_WITH_SB(s)); | 65 | reiserfs_restore_prepared_buffer(s, SB_BUFFER_WITH_SB(s)); |
66 | return 0; | 66 | return 0; |
67 | } | 67 | } |
@@ -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 | ||