diff options
author | Jeff Mahoney <jeffm@suse.com> | 2014-04-23 10:00:42 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2014-05-06 17:18:16 -0400 |
commit | a228bf8f0a3e5f1406edbd61f7400e87e23af5f7 (patch) | |
tree | 44b6806245ad0c93f607c4df73ab7c26a404347d /fs | |
parent | cf776a7a4dafa330dd371a6a301ddf9e38747d93 (diff) |
reiserfs: cleanup, remove unnecessary parens
The reiserfs code is littered with extra parens in places where the authors
may not have been certain about precedence of & vs ->. This patch cleans them
out.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/reiserfs/bitmap.c | 6 | ||||
-rw-r--r-- | fs/reiserfs/dir.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/do_balan.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/file.c | 16 | ||||
-rw-r--r-- | fs/reiserfs/fix_node.c | 8 | ||||
-rw-r--r-- | fs/reiserfs/ibalance.c | 4 | ||||
-rw-r--r-- | fs/reiserfs/inode.c | 10 | ||||
-rw-r--r-- | fs/reiserfs/item_ops.c | 4 | ||||
-rw-r--r-- | fs/reiserfs/journal.c | 73 | ||||
-rw-r--r-- | fs/reiserfs/lbalance.c | 76 | ||||
-rw-r--r-- | fs/reiserfs/namei.c | 21 | ||||
-rw-r--r-- | fs/reiserfs/prints.c | 8 | ||||
-rw-r--r-- | fs/reiserfs/stree.c | 9 | ||||
-rw-r--r-- | fs/reiserfs/super.c | 16 | ||||
-rw-r--r-- | fs/reiserfs/xattr.c | 4 |
15 files changed, 129 insertions, 130 deletions
diff --git a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c index 543a2a23a293..59f786dded49 100644 --- a/fs/reiserfs/bitmap.c +++ b/fs/reiserfs/bitmap.c | |||
@@ -78,7 +78,7 @@ int is_reusable(struct super_block *s, b_blocknr_t block, int bit_value) | |||
78 | * up front so we need to account for it. | 78 | * up front so we need to account for it. |
79 | */ | 79 | */ |
80 | if (unlikely(test_bit(REISERFS_OLD_FORMAT, | 80 | if (unlikely(test_bit(REISERFS_OLD_FORMAT, |
81 | &(REISERFS_SB(s)->s_properties)))) { | 81 | &REISERFS_SB(s)->s_properties))) { |
82 | b_blocknr_t bmap1 = REISERFS_SB(s)->s_sbh->b_blocknr + 1; | 82 | b_blocknr_t bmap1 = REISERFS_SB(s)->s_sbh->b_blocknr + 1; |
83 | if (block >= bmap1 && | 83 | if (block >= bmap1 && |
84 | block <= bmap1 + bmap_count) { | 84 | block <= bmap1 + bmap_count) { |
@@ -524,7 +524,7 @@ static void __discard_prealloc(struct reiserfs_transaction_handle *th, | |||
524 | if (dirty) | 524 | if (dirty) |
525 | reiserfs_update_sd(th, inode); | 525 | reiserfs_update_sd(th, inode); |
526 | ei->i_prealloc_block = save; | 526 | ei->i_prealloc_block = save; |
527 | list_del_init(&(ei->i_prealloc_list)); | 527 | list_del_init(&ei->i_prealloc_list); |
528 | } | 528 | } |
529 | 529 | ||
530 | /* FIXME: It should be inline function */ | 530 | /* FIXME: It should be inline function */ |
@@ -1417,7 +1417,7 @@ struct buffer_head *reiserfs_read_bitmap_block(struct super_block *sb, | |||
1417 | * I doubt there are any of these left, but just in case... | 1417 | * I doubt there are any of these left, but just in case... |
1418 | */ | 1418 | */ |
1419 | if (unlikely(test_bit(REISERFS_OLD_FORMAT, | 1419 | if (unlikely(test_bit(REISERFS_OLD_FORMAT, |
1420 | &(REISERFS_SB(sb)->s_properties)))) | 1420 | &REISERFS_SB(sb)->s_properties))) |
1421 | block = REISERFS_SB(sb)->s_sbh->b_blocknr + 1 + bitmap; | 1421 | block = REISERFS_SB(sb)->s_sbh->b_blocknr + 1 + bitmap; |
1422 | else if (bitmap == 0) | 1422 | else if (bitmap == 0) |
1423 | block = (REISERFS_DISK_OFFSET_IN_BYTES >> sb->s_blocksize_bits) + 1; | 1423 | block = (REISERFS_DISK_OFFSET_IN_BYTES >> sb->s_blocksize_bits) + 1; |
diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c index 367a47ca4b37..d9f5a60dd59b 100644 --- a/fs/reiserfs/dir.c +++ b/fs/reiserfs/dir.c | |||
@@ -112,7 +112,7 @@ research: | |||
112 | store_ih(&tmp_ih, ih); | 112 | store_ih(&tmp_ih, ih); |
113 | 113 | ||
114 | /* we must have found item, that is item of this directory, */ | 114 | /* we must have found item, that is item of this directory, */ |
115 | RFALSE(COMP_SHORT_KEYS(&(ih->ih_key), &pos_key), | 115 | RFALSE(COMP_SHORT_KEYS(&ih->ih_key, &pos_key), |
116 | "vs-9000: found item %h does not match to dir we readdir %K", | 116 | "vs-9000: found item %h does not match to dir we readdir %K", |
117 | ih, &pos_key); | 117 | ih, &pos_key); |
118 | RFALSE(item_num > B_NR_ITEMS(bh) - 1, | 118 | RFALSE(item_num > B_NR_ITEMS(bh) - 1, |
diff --git a/fs/reiserfs/do_balan.c b/fs/reiserfs/do_balan.c index 7decd932bf82..bfed0f6d9185 100644 --- a/fs/reiserfs/do_balan.c +++ b/fs/reiserfs/do_balan.c | |||
@@ -1575,7 +1575,7 @@ void do_balance(struct tree_balance *tb, struct item_head *ih, | |||
1575 | return; | 1575 | return; |
1576 | } | 1576 | } |
1577 | 1577 | ||
1578 | atomic_inc(&(fs_generation(tb->tb_sb))); | 1578 | atomic_inc(&fs_generation(tb->tb_sb)); |
1579 | do_balance_starts(tb); | 1579 | do_balance_starts(tb); |
1580 | 1580 | ||
1581 | /* | 1581 | /* |
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index 8496b09f00be..5f6c32c668b6 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c | |||
@@ -41,10 +41,10 @@ static int reiserfs_file_release(struct inode *inode, struct file *filp) | |||
41 | if (atomic_add_unless(&REISERFS_I(inode)->openers, -1, 1)) | 41 | if (atomic_add_unless(&REISERFS_I(inode)->openers, -1, 1)) |
42 | return 0; | 42 | return 0; |
43 | 43 | ||
44 | mutex_lock(&(REISERFS_I(inode)->tailpack)); | 44 | mutex_lock(&REISERFS_I(inode)->tailpack); |
45 | 45 | ||
46 | if (!atomic_dec_and_test(&REISERFS_I(inode)->openers)) { | 46 | if (!atomic_dec_and_test(&REISERFS_I(inode)->openers)) { |
47 | mutex_unlock(&(REISERFS_I(inode)->tailpack)); | 47 | mutex_unlock(&REISERFS_I(inode)->tailpack); |
48 | return 0; | 48 | return 0; |
49 | } | 49 | } |
50 | 50 | ||
@@ -52,7 +52,7 @@ static int reiserfs_file_release(struct inode *inode, struct file *filp) | |||
52 | if ((!(REISERFS_I(inode)->i_flags & i_pack_on_close_mask) || | 52 | if ((!(REISERFS_I(inode)->i_flags & i_pack_on_close_mask) || |
53 | !tail_has_to_be_packed(inode)) && | 53 | !tail_has_to_be_packed(inode)) && |
54 | REISERFS_I(inode)->i_prealloc_count <= 0) { | 54 | REISERFS_I(inode)->i_prealloc_count <= 0) { |
55 | mutex_unlock(&(REISERFS_I(inode)->tailpack)); | 55 | mutex_unlock(&REISERFS_I(inode)->tailpack); |
56 | return 0; | 56 | return 0; |
57 | } | 57 | } |
58 | 58 | ||
@@ -116,7 +116,7 @@ static int reiserfs_file_release(struct inode *inode, struct file *filp) | |||
116 | } | 116 | } |
117 | out: | 117 | out: |
118 | reiserfs_write_unlock(inode->i_sb); | 118 | reiserfs_write_unlock(inode->i_sb); |
119 | mutex_unlock(&(REISERFS_I(inode)->tailpack)); | 119 | mutex_unlock(&REISERFS_I(inode)->tailpack); |
120 | return err; | 120 | return err; |
121 | } | 121 | } |
122 | 122 | ||
@@ -126,18 +126,18 @@ static int reiserfs_file_open(struct inode *inode, struct file *file) | |||
126 | 126 | ||
127 | /* somebody might be tailpacking on final close; wait for it */ | 127 | /* somebody might be tailpacking on final close; wait for it */ |
128 | if (!atomic_inc_not_zero(&REISERFS_I(inode)->openers)) { | 128 | if (!atomic_inc_not_zero(&REISERFS_I(inode)->openers)) { |
129 | mutex_lock(&(REISERFS_I(inode)->tailpack)); | 129 | mutex_lock(&REISERFS_I(inode)->tailpack); |
130 | atomic_inc(&REISERFS_I(inode)->openers); | 130 | atomic_inc(&REISERFS_I(inode)->openers); |
131 | mutex_unlock(&(REISERFS_I(inode)->tailpack)); | 131 | mutex_unlock(&REISERFS_I(inode)->tailpack); |
132 | } | 132 | } |
133 | return err; | 133 | return err; |
134 | } | 134 | } |
135 | 135 | ||
136 | void reiserfs_vfs_truncate_file(struct inode *inode) | 136 | void reiserfs_vfs_truncate_file(struct inode *inode) |
137 | { | 137 | { |
138 | mutex_lock(&(REISERFS_I(inode)->tailpack)); | 138 | mutex_lock(&REISERFS_I(inode)->tailpack); |
139 | reiserfs_truncate_file(inode, 1); | 139 | reiserfs_truncate_file(inode, 1); |
140 | mutex_unlock(&(REISERFS_I(inode)->tailpack)); | 140 | mutex_unlock(&REISERFS_I(inode)->tailpack); |
141 | } | 141 | } |
142 | 142 | ||
143 | /* Sync a reiserfs file. */ | 143 | /* Sync a reiserfs file. */ |
diff --git a/fs/reiserfs/fix_node.c b/fs/reiserfs/fix_node.c index 33bbcb68b662..46b014623fd6 100644 --- a/fs/reiserfs/fix_node.c +++ b/fs/reiserfs/fix_node.c | |||
@@ -81,7 +81,7 @@ static void create_virtual_node(struct tree_balance *tb, int h) | |||
81 | ih = item_head(Sh, 0); | 81 | ih = item_head(Sh, 0); |
82 | 82 | ||
83 | /* define the mergeability for 0-th item (if it is not being deleted) */ | 83 | /* define the mergeability for 0-th item (if it is not being deleted) */ |
84 | if (op_is_left_mergeable(&(ih->ih_key), Sh->b_size) | 84 | if (op_is_left_mergeable(&ih->ih_key, Sh->b_size) |
85 | && (vn->vn_mode != M_DELETE || vn->vn_affected_item_num)) | 85 | && (vn->vn_mode != M_DELETE || vn->vn_affected_item_num)) |
86 | vn->vn_vi[0].vi_type |= VI_TYPE_LEFT_MERGEABLE; | 86 | vn->vn_vi[0].vi_type |= VI_TYPE_LEFT_MERGEABLE; |
87 | 87 | ||
@@ -682,7 +682,7 @@ static int is_leaf_removable(struct tree_balance *tb) | |||
682 | /* check whether we can divide 1 remaining item between neighbors */ | 682 | /* check whether we can divide 1 remaining item between neighbors */ |
683 | 683 | ||
684 | /* get size of remaining item (in item units) */ | 684 | /* get size of remaining item (in item units) */ |
685 | size = op_unit_num(&(vn->vn_vi[to_left])); | 685 | size = op_unit_num(&vn->vn_vi[to_left]); |
686 | 686 | ||
687 | if (tb->lbytes + tb->rbytes >= size) { | 687 | if (tb->lbytes + tb->rbytes >= size) { |
688 | set_parameters(tb, 0, to_left + 1, to_right + 1, 0, NULL, | 688 | set_parameters(tb, 0, to_left + 1, to_right + 1, 0, NULL, |
@@ -720,7 +720,7 @@ static int are_leaves_removable(struct tree_balance *tb, int lfree, int rfree) | |||
720 | 720 | ||
721 | ih = item_head(S0, 0); | 721 | ih = item_head(S0, 0); |
722 | if (tb->CFR[0] | 722 | if (tb->CFR[0] |
723 | && !comp_short_le_keys(&(ih->ih_key), | 723 | && !comp_short_le_keys(&ih->ih_key, |
724 | internal_key(tb->CFR[0], | 724 | internal_key(tb->CFR[0], |
725 | tb->rkey[0]))) | 725 | tb->rkey[0]))) |
726 | /* | 726 | /* |
@@ -1287,7 +1287,7 @@ static inline int can_node_be_removed(int mode, int lfree, int sfree, int rfree, | |||
1287 | /* shifting may merge items which might save space */ | 1287 | /* shifting may merge items which might save space */ |
1288 | - | 1288 | - |
1289 | ((!h | 1289 | ((!h |
1290 | && op_is_left_mergeable(&(ih->ih_key), Sh->b_size)) ? IH_SIZE : 0) | 1290 | && op_is_left_mergeable(&ih->ih_key, Sh->b_size)) ? IH_SIZE : 0) |
1291 | - | 1291 | - |
1292 | ((!h && r_key | 1292 | ((!h && r_key |
1293 | && op_is_left_mergeable(r_key, Sh->b_size)) ? IH_SIZE : 0) | 1293 | && op_is_left_mergeable(r_key, Sh->b_size)) ? IH_SIZE : 0) |
diff --git a/fs/reiserfs/ibalance.c b/fs/reiserfs/ibalance.c index c4a696714148..73231b1ebdbe 100644 --- a/fs/reiserfs/ibalance.c +++ b/fs/reiserfs/ibalance.c | |||
@@ -154,9 +154,9 @@ static void internal_insert_childs(struct buffer_info *cur_bi, | |||
154 | 154 | ||
155 | /* copy to_be_insert disk children */ | 155 | /* copy to_be_insert disk children */ |
156 | for (i = 0; i < count; i++) { | 156 | for (i = 0; i < count; i++) { |
157 | put_dc_size(&(new_dc[i]), | 157 | put_dc_size(&new_dc[i], |
158 | MAX_CHILD_SIZE(bh[i]) - B_FREE_SPACE(bh[i])); | 158 | MAX_CHILD_SIZE(bh[i]) - B_FREE_SPACE(bh[i])); |
159 | put_dc_block_number(&(new_dc[i]), bh[i]->b_blocknr); | 159 | put_dc_block_number(&new_dc[i], bh[i]->b_blocknr); |
160 | } | 160 | } |
161 | memcpy(dc, new_dc, DC_SIZE * count); | 161 | memcpy(dc, new_dc, DC_SIZE * count); |
162 | 162 | ||
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index c811289a1820..874c8b329cfe 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -1027,7 +1027,7 @@ research: | |||
1027 | */ | 1027 | */ |
1028 | make_cpu_key(&tmp_key, inode, | 1028 | make_cpu_key(&tmp_key, inode, |
1029 | le_key_k_offset(version, | 1029 | le_key_k_offset(version, |
1030 | &(ih->ih_key)) + | 1030 | &ih->ih_key) + |
1031 | op_bytes_number(ih, | 1031 | op_bytes_number(ih, |
1032 | inode->i_sb->s_blocksize), | 1032 | inode->i_sb->s_blocksize), |
1033 | TYPE_INDIRECT, 3); | 1033 | TYPE_INDIRECT, 3); |
@@ -1243,9 +1243,9 @@ static void init_inode(struct inode *inode, struct treepath *path) | |||
1243 | bh = PATH_PLAST_BUFFER(path); | 1243 | bh = PATH_PLAST_BUFFER(path); |
1244 | ih = tp_item_head(path); | 1244 | ih = tp_item_head(path); |
1245 | 1245 | ||
1246 | copy_key(INODE_PKEY(inode), &(ih->ih_key)); | 1246 | copy_key(INODE_PKEY(inode), &ih->ih_key); |
1247 | 1247 | ||
1248 | INIT_LIST_HEAD(&(REISERFS_I(inode)->i_prealloc_list)); | 1248 | INIT_LIST_HEAD(&REISERFS_I(inode)->i_prealloc_list); |
1249 | REISERFS_I(inode)->i_flags = 0; | 1249 | REISERFS_I(inode)->i_flags = 0; |
1250 | REISERFS_I(inode)->i_prealloc_block = 0; | 1250 | REISERFS_I(inode)->i_prealloc_block = 0; |
1251 | REISERFS_I(inode)->i_prealloc_count = 0; | 1251 | REISERFS_I(inode)->i_prealloc_count = 0; |
@@ -1967,7 +1967,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | |||
1967 | else | 1967 | else |
1968 | make_le_item_head(&ih, NULL, KEY_FORMAT_3_6, SD_OFFSET, | 1968 | make_le_item_head(&ih, NULL, KEY_FORMAT_3_6, SD_OFFSET, |
1969 | TYPE_STAT_DATA, SD_SIZE, MAX_US_INT); | 1969 | TYPE_STAT_DATA, SD_SIZE, MAX_US_INT); |
1970 | memcpy(INODE_PKEY(inode), &(ih.ih_key), KEY_SIZE); | 1970 | memcpy(INODE_PKEY(inode), &ih.ih_key, KEY_SIZE); |
1971 | args.dirid = le32_to_cpu(ih.ih_key.k_dir_id); | 1971 | args.dirid = le32_to_cpu(ih.ih_key.k_dir_id); |
1972 | 1972 | ||
1973 | depth = reiserfs_write_unlock_nested(inode->i_sb); | 1973 | depth = reiserfs_write_unlock_nested(inode->i_sb); |
@@ -2011,7 +2011,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | |||
2011 | REISERFS_I(inode)->i_first_direct_byte = S_ISLNK(mode) ? 1 : | 2011 | REISERFS_I(inode)->i_first_direct_byte = S_ISLNK(mode) ? 1 : |
2012 | U32_MAX /*NO_BYTES_IN_DIRECT_ITEM */ ; | 2012 | U32_MAX /*NO_BYTES_IN_DIRECT_ITEM */ ; |
2013 | 2013 | ||
2014 | INIT_LIST_HEAD(&(REISERFS_I(inode)->i_prealloc_list)); | 2014 | INIT_LIST_HEAD(&REISERFS_I(inode)->i_prealloc_list); |
2015 | REISERFS_I(inode)->i_flags = 0; | 2015 | REISERFS_I(inode)->i_flags = 0; |
2016 | REISERFS_I(inode)->i_prealloc_block = 0; | 2016 | REISERFS_I(inode)->i_prealloc_block = 0; |
2017 | REISERFS_I(inode)->i_prealloc_count = 0; | 2017 | REISERFS_I(inode)->i_prealloc_count = 0; |
diff --git a/fs/reiserfs/item_ops.c b/fs/reiserfs/item_ops.c index cb6b826ca5e9..cfaee912ee09 100644 --- a/fs/reiserfs/item_ops.c +++ b/fs/reiserfs/item_ops.c | |||
@@ -491,8 +491,8 @@ static int direntry_create_vi(struct virtual_node *vn, | |||
491 | j = old_entry_num(is_affected, i, vn->vn_pos_in_item, | 491 | j = old_entry_num(is_affected, i, vn->vn_pos_in_item, |
492 | vn->vn_mode); | 492 | vn->vn_mode); |
493 | dir_u->entry_sizes[i] = | 493 | dir_u->entry_sizes[i] = |
494 | (j ? deh_location(&(deh[j - 1])) : ih_item_len(vi->vi_ih)) - | 494 | (j ? deh_location(&deh[j - 1]) : ih_item_len(vi->vi_ih)) - |
495 | deh_location(&(deh[j])) + DEH_SIZE; | 495 | deh_location(&deh[j]) + DEH_SIZE; |
496 | } | 496 | } |
497 | 497 | ||
498 | size += (dir_u->entry_count * sizeof(short)); | 498 | size += (dir_u->entry_count * sizeof(short)); |
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 75b0285dc27a..e8870de4627e 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -1016,9 +1016,9 @@ static int flush_commit_list(struct super_block *s, | |||
1016 | BUG_ON(jl->j_trans_id == 0); | 1016 | BUG_ON(jl->j_trans_id == 0); |
1017 | 1017 | ||
1018 | /* this commit is done, exit */ | 1018 | /* this commit is done, exit */ |
1019 | if (atomic_read(&(jl->j_commit_left)) <= 0) { | 1019 | if (atomic_read(&jl->j_commit_left) <= 0) { |
1020 | if (flushall) { | 1020 | if (flushall) { |
1021 | atomic_set(&(jl->j_older_commits_done), 1); | 1021 | atomic_set(&jl->j_older_commits_done, 1); |
1022 | } | 1022 | } |
1023 | mutex_unlock(&jl->j_commit_mutex); | 1023 | mutex_unlock(&jl->j_commit_mutex); |
1024 | goto put_jl; | 1024 | goto put_jl; |
@@ -1094,10 +1094,10 @@ static int flush_commit_list(struct super_block *s, | |||
1094 | put_bh(tbh); | 1094 | put_bh(tbh); |
1095 | /* once due to original getblk in do_journal_end */ | 1095 | /* once due to original getblk in do_journal_end */ |
1096 | put_bh(tbh); | 1096 | put_bh(tbh); |
1097 | atomic_dec(&(jl->j_commit_left)); | 1097 | atomic_dec(&jl->j_commit_left); |
1098 | } | 1098 | } |
1099 | 1099 | ||
1100 | BUG_ON(atomic_read(&(jl->j_commit_left)) != 1); | 1100 | BUG_ON(atomic_read(&jl->j_commit_left) != 1); |
1101 | 1101 | ||
1102 | /* | 1102 | /* |
1103 | * If there was a write error in the journal - we can't commit | 1103 | * If there was a write error in the journal - we can't commit |
@@ -1147,10 +1147,10 @@ static int flush_commit_list(struct super_block *s, | |||
1147 | /* mark the metadata dirty */ | 1147 | /* mark the metadata dirty */ |
1148 | if (!retval) | 1148 | if (!retval) |
1149 | dirty_one_transaction(s, jl); | 1149 | dirty_one_transaction(s, jl); |
1150 | atomic_dec(&(jl->j_commit_left)); | 1150 | atomic_dec(&jl->j_commit_left); |
1151 | 1151 | ||
1152 | if (flushall) { | 1152 | if (flushall) { |
1153 | atomic_set(&(jl->j_older_commits_done), 1); | 1153 | atomic_set(&jl->j_older_commits_done, 1); |
1154 | } | 1154 | } |
1155 | mutex_unlock(&jl->j_commit_mutex); | 1155 | mutex_unlock(&jl->j_commit_mutex); |
1156 | put_jl: | 1156 | put_jl: |
@@ -1379,8 +1379,8 @@ static int flush_journal_list(struct super_block *s, | |||
1379 | } | 1379 | } |
1380 | 1380 | ||
1381 | /* if all the work is already done, get out of here */ | 1381 | /* if all the work is already done, get out of here */ |
1382 | if (atomic_read(&(jl->j_nonzerolen)) <= 0 && | 1382 | if (atomic_read(&jl->j_nonzerolen) <= 0 && |
1383 | atomic_read(&(jl->j_commit_left)) <= 0) { | 1383 | atomic_read(&jl->j_commit_left) <= 0) { |
1384 | goto flush_older_and_return; | 1384 | goto flush_older_and_return; |
1385 | } | 1385 | } |
1386 | 1386 | ||
@@ -1395,8 +1395,8 @@ static int flush_journal_list(struct super_block *s, | |||
1395 | BUG(); | 1395 | BUG(); |
1396 | 1396 | ||
1397 | /* are we done now? */ | 1397 | /* are we done now? */ |
1398 | if (atomic_read(&(jl->j_nonzerolen)) <= 0 && | 1398 | if (atomic_read(&jl->j_nonzerolen) <= 0 && |
1399 | atomic_read(&(jl->j_commit_left)) <= 0) { | 1399 | atomic_read(&jl->j_commit_left) <= 0) { |
1400 | goto flush_older_and_return; | 1400 | goto flush_older_and_return; |
1401 | } | 1401 | } |
1402 | 1402 | ||
@@ -1404,7 +1404,7 @@ static int flush_journal_list(struct super_block *s, | |||
1404 | * loop through each cnode, see if we need to write it, | 1404 | * loop through each cnode, see if we need to write it, |
1405 | * or wait on a more recent transaction, or just ignore it | 1405 | * or wait on a more recent transaction, or just ignore it |
1406 | */ | 1406 | */ |
1407 | if (atomic_read(&(journal->j_wcount)) != 0) { | 1407 | if (atomic_read(&journal->j_wcount) != 0) { |
1408 | reiserfs_panic(s, "journal-844", "journal list is flushing, " | 1408 | reiserfs_panic(s, "journal-844", "journal list is flushing, " |
1409 | "wcount is not 0"); | 1409 | "wcount is not 0"); |
1410 | } | 1410 | } |
@@ -1513,7 +1513,7 @@ free_cnode: | |||
1513 | * taking the buffer head away | 1513 | * taking the buffer head away |
1514 | */ | 1514 | */ |
1515 | put_bh(saved_bh); | 1515 | put_bh(saved_bh); |
1516 | if (atomic_read(&(saved_bh->b_count)) < 0) { | 1516 | if (atomic_read(&saved_bh->b_count) < 0) { |
1517 | reiserfs_warning(s, "journal-945", | 1517 | reiserfs_warning(s, "journal-945", |
1518 | "saved_bh->b_count < 0"); | 1518 | "saved_bh->b_count < 0"); |
1519 | } | 1519 | } |
@@ -1614,7 +1614,7 @@ flush_older_and_return: | |||
1614 | * help find code using dead lists later on | 1614 | * help find code using dead lists later on |
1615 | */ | 1615 | */ |
1616 | jl->j_len = 0; | 1616 | jl->j_len = 0; |
1617 | atomic_set(&(jl->j_nonzerolen), 0); | 1617 | atomic_set(&jl->j_nonzerolen, 0); |
1618 | jl->j_start = 0; | 1618 | jl->j_start = 0; |
1619 | jl->j_realblock = NULL; | 1619 | jl->j_realblock = NULL; |
1620 | jl->j_commit_bh = NULL; | 1620 | jl->j_commit_bh = NULL; |
@@ -1873,7 +1873,7 @@ void remove_journal_hash(struct super_block *sb, | |||
1873 | * dec the nonzerolen | 1873 | * dec the nonzerolen |
1874 | */ | 1874 | */ |
1875 | if (cur->bh && cur->jlist) | 1875 | if (cur->bh && cur->jlist) |
1876 | atomic_dec(&(cur->jlist->j_nonzerolen)); | 1876 | atomic_dec(&cur->jlist->j_nonzerolen); |
1877 | cur->bh = NULL; | 1877 | cur->bh = NULL; |
1878 | cur->jlist = NULL; | 1878 | cur->jlist = NULL; |
1879 | } | 1879 | } |
@@ -2836,20 +2836,20 @@ int journal_init(struct super_block *sb, const char *j_dev_name, | |||
2836 | journal->j_start = 0; | 2836 | journal->j_start = 0; |
2837 | journal->j_len = 0; | 2837 | journal->j_len = 0; |
2838 | journal->j_len_alloc = 0; | 2838 | journal->j_len_alloc = 0; |
2839 | atomic_set(&(journal->j_wcount), 0); | 2839 | atomic_set(&journal->j_wcount, 0); |
2840 | atomic_set(&(journal->j_async_throttle), 0); | 2840 | atomic_set(&journal->j_async_throttle, 0); |
2841 | journal->j_bcount = 0; | 2841 | journal->j_bcount = 0; |
2842 | journal->j_trans_start_time = 0; | 2842 | journal->j_trans_start_time = 0; |
2843 | journal->j_last = NULL; | 2843 | journal->j_last = NULL; |
2844 | journal->j_first = NULL; | 2844 | journal->j_first = NULL; |
2845 | init_waitqueue_head(&(journal->j_join_wait)); | 2845 | init_waitqueue_head(&journal->j_join_wait); |
2846 | mutex_init(&journal->j_mutex); | 2846 | mutex_init(&journal->j_mutex); |
2847 | mutex_init(&journal->j_flush_mutex); | 2847 | mutex_init(&journal->j_flush_mutex); |
2848 | 2848 | ||
2849 | journal->j_trans_id = 10; | 2849 | journal->j_trans_id = 10; |
2850 | journal->j_mount_id = 10; | 2850 | journal->j_mount_id = 10; |
2851 | journal->j_state = 0; | 2851 | journal->j_state = 0; |
2852 | atomic_set(&(journal->j_jlock), 0); | 2852 | atomic_set(&journal->j_jlock, 0); |
2853 | journal->j_cnode_free_list = allocate_cnodes(num_cnodes); | 2853 | journal->j_cnode_free_list = allocate_cnodes(num_cnodes); |
2854 | journal->j_cnode_free_orig = journal->j_cnode_free_list; | 2854 | journal->j_cnode_free_orig = journal->j_cnode_free_list; |
2855 | journal->j_cnode_free = journal->j_cnode_free_list ? num_cnodes : 0; | 2855 | journal->j_cnode_free = journal->j_cnode_free_list ? num_cnodes : 0; |
@@ -2913,7 +2913,7 @@ int journal_transaction_should_end(struct reiserfs_transaction_handle *th, | |||
2913 | return 0; | 2913 | return 0; |
2914 | if (journal->j_must_wait > 0 || | 2914 | if (journal->j_must_wait > 0 || |
2915 | (journal->j_len_alloc + new_alloc) >= journal->j_max_batch || | 2915 | (journal->j_len_alloc + new_alloc) >= journal->j_max_batch || |
2916 | atomic_read(&(journal->j_jlock)) || | 2916 | atomic_read(&journal->j_jlock) || |
2917 | (now - journal->j_trans_start_time) > journal->j_max_trans_age || | 2917 | (now - journal->j_trans_start_time) > journal->j_max_trans_age || |
2918 | journal->j_cnode_free < (journal->j_trans_max * 3)) { | 2918 | journal->j_cnode_free < (journal->j_trans_max * 3)) { |
2919 | return 1; | 2919 | return 1; |
@@ -3113,7 +3113,7 @@ relock: | |||
3113 | if (journal->j_trans_start_time == 0) { | 3113 | if (journal->j_trans_start_time == 0) { |
3114 | journal->j_trans_start_time = get_seconds(); | 3114 | journal->j_trans_start_time = get_seconds(); |
3115 | } | 3115 | } |
3116 | atomic_inc(&(journal->j_wcount)); | 3116 | atomic_inc(&journal->j_wcount); |
3117 | journal->j_len_alloc += nblocks; | 3117 | journal->j_len_alloc += nblocks; |
3118 | th->t_blocks_logged = 0; | 3118 | th->t_blocks_logged = 0; |
3119 | th->t_blocks_allocated = nblocks; | 3119 | th->t_blocks_allocated = nblocks; |
@@ -3306,10 +3306,10 @@ int journal_mark_dirty(struct reiserfs_transaction_handle *th, | |||
3306 | buffer_journal_dirty(bh) ? ' ' : '!'); | 3306 | buffer_journal_dirty(bh) ? ' ' : '!'); |
3307 | } | 3307 | } |
3308 | 3308 | ||
3309 | if (atomic_read(&(journal->j_wcount)) <= 0) { | 3309 | if (atomic_read(&journal->j_wcount) <= 0) { |
3310 | reiserfs_warning(sb, "journal-1409", | 3310 | reiserfs_warning(sb, "journal-1409", |
3311 | "returning because j_wcount was %d", | 3311 | "returning because j_wcount was %d", |
3312 | atomic_read(&(journal->j_wcount))); | 3312 | atomic_read(&journal->j_wcount)); |
3313 | return 1; | 3313 | return 1; |
3314 | } | 3314 | } |
3315 | /* | 3315 | /* |
@@ -3448,7 +3448,7 @@ static int remove_from_transaction(struct super_block *sb, | |||
3448 | clear_buffer_dirty(bh); | 3448 | clear_buffer_dirty(bh); |
3449 | clear_buffer_journal_test(bh); | 3449 | clear_buffer_journal_test(bh); |
3450 | put_bh(bh); | 3450 | put_bh(bh); |
3451 | if (atomic_read(&(bh->b_count)) < 0) { | 3451 | if (atomic_read(&bh->b_count) < 0) { |
3452 | reiserfs_warning(sb, "journal-1752", | 3452 | reiserfs_warning(sb, "journal-1752", |
3453 | "b_count < 0"); | 3453 | "b_count < 0"); |
3454 | } | 3454 | } |
@@ -3497,7 +3497,7 @@ static int can_dirty(struct reiserfs_journal_cnode *cn) | |||
3497 | cur = cn->hnext; | 3497 | cur = cn->hnext; |
3498 | while (cur && can_dirty) { | 3498 | while (cur && can_dirty) { |
3499 | if (cur->jlist && cur->jlist->j_len > 0 && | 3499 | if (cur->jlist && cur->jlist->j_len > 0 && |
3500 | atomic_read(&(cur->jlist->j_commit_left)) > 0 && cur->bh && | 3500 | atomic_read(&cur->jlist->j_commit_left) > 0 && cur->bh && |
3501 | cur->blocknr && cur->sb == sb && cur->blocknr == blocknr) { | 3501 | cur->blocknr && cur->sb == sb && cur->blocknr == blocknr) { |
3502 | can_dirty = 0; | 3502 | can_dirty = 0; |
3503 | } | 3503 | } |
@@ -3623,8 +3623,8 @@ static int check_journal_end(struct reiserfs_transaction_handle *th, int flags) | |||
3623 | 3623 | ||
3624 | journal->j_len_alloc -= (th->t_blocks_allocated - th->t_blocks_logged); | 3624 | journal->j_len_alloc -= (th->t_blocks_allocated - th->t_blocks_logged); |
3625 | /* <= 0 is allowed. unmounting might not call begin */ | 3625 | /* <= 0 is allowed. unmounting might not call begin */ |
3626 | if (atomic_read(&(journal->j_wcount)) > 0) | 3626 | if (atomic_read(&journal->j_wcount) > 0) |
3627 | atomic_dec(&(journal->j_wcount)); | 3627 | atomic_dec(&journal->j_wcount); |
3628 | 3628 | ||
3629 | /* | 3629 | /* |
3630 | * BUG, deal with case where j_len is 0, but people previously | 3630 | * BUG, deal with case where j_len is 0, but people previously |
@@ -3642,7 +3642,7 @@ static int check_journal_end(struct reiserfs_transaction_handle *th, int flags) | |||
3642 | * because the rest of journal end was already done for this | 3642 | * because the rest of journal end was already done for this |
3643 | * transaction. | 3643 | * transaction. |
3644 | */ | 3644 | */ |
3645 | if (atomic_read(&(journal->j_wcount)) > 0) { | 3645 | if (atomic_read(&journal->j_wcount) > 0) { |
3646 | if (flush || commit_now) { | 3646 | if (flush || commit_now) { |
3647 | unsigned trans_id; | 3647 | unsigned trans_id; |
3648 | 3648 | ||
@@ -3650,7 +3650,7 @@ static int check_journal_end(struct reiserfs_transaction_handle *th, int flags) | |||
3650 | trans_id = jl->j_trans_id; | 3650 | trans_id = jl->j_trans_id; |
3651 | if (wait_on_commit) | 3651 | if (wait_on_commit) |
3652 | jl->j_state |= LIST_COMMIT_PENDING; | 3652 | jl->j_state |= LIST_COMMIT_PENDING; |
3653 | atomic_set(&(journal->j_jlock), 1); | 3653 | atomic_set(&journal->j_jlock, 1); |
3654 | if (flush) { | 3654 | if (flush) { |
3655 | journal->j_next_full_flush = 1; | 3655 | journal->j_next_full_flush = 1; |
3656 | } | 3656 | } |
@@ -3666,7 +3666,7 @@ static int check_journal_end(struct reiserfs_transaction_handle *th, int flags) | |||
3666 | } else { | 3666 | } else { |
3667 | lock_journal(sb); | 3667 | lock_journal(sb); |
3668 | if (journal->j_trans_id == trans_id) { | 3668 | if (journal->j_trans_id == trans_id) { |
3669 | atomic_set(&(journal->j_jlock), | 3669 | atomic_set(&journal->j_jlock, |
3670 | 1); | 3670 | 1); |
3671 | } | 3671 | } |
3672 | unlock_journal(sb); | 3672 | unlock_journal(sb); |
@@ -3693,7 +3693,7 @@ static int check_journal_end(struct reiserfs_transaction_handle *th, int flags) | |||
3693 | } | 3693 | } |
3694 | /* don't batch when someone is waiting on j_join_wait */ | 3694 | /* don't batch when someone is waiting on j_join_wait */ |
3695 | /* don't batch when syncing the commit or flushing the whole trans */ | 3695 | /* don't batch when syncing the commit or flushing the whole trans */ |
3696 | if (!(journal->j_must_wait > 0) && !(atomic_read(&(journal->j_jlock))) | 3696 | if (!(journal->j_must_wait > 0) && !(atomic_read(&journal->j_jlock)) |
3697 | && !flush && !commit_now && (journal->j_len < journal->j_max_batch) | 3697 | && !flush && !commit_now && (journal->j_len < journal->j_max_batch) |
3698 | && journal->j_len_alloc < journal->j_max_batch | 3698 | && journal->j_len_alloc < journal->j_max_batch |
3699 | && journal->j_cnode_free > (journal->j_trans_max * 3)) { | 3699 | && journal->j_cnode_free > (journal->j_trans_max * 3)) { |
@@ -3792,7 +3792,7 @@ int journal_mark_freed(struct reiserfs_transaction_handle *th, | |||
3792 | cleaned = 1; | 3792 | cleaned = 1; |
3793 | put_bh(cn->bh); | 3793 | put_bh(cn->bh); |
3794 | if (atomic_read | 3794 | if (atomic_read |
3795 | (&(cn->bh->b_count)) < 0) { | 3795 | (&cn->bh->b_count) < 0) { |
3796 | reiserfs_warning(sb, | 3796 | reiserfs_warning(sb, |
3797 | "journal-2138", | 3797 | "journal-2138", |
3798 | "cn->bh->b_count < 0"); | 3798 | "cn->bh->b_count < 0"); |
@@ -3803,9 +3803,8 @@ int journal_mark_freed(struct reiserfs_transaction_handle *th, | |||
3803 | * we MUST dec nonzerolen | 3803 | * we MUST dec nonzerolen |
3804 | */ | 3804 | */ |
3805 | if (cn->jlist) { | 3805 | if (cn->jlist) { |
3806 | atomic_dec(& | 3806 | atomic_dec(&cn->jlist-> |
3807 | (cn->jlist-> | 3807 | j_nonzerolen); |
3808 | j_nonzerolen)); | ||
3809 | } | 3808 | } |
3810 | cn->bh = NULL; | 3809 | cn->bh = NULL; |
3811 | } | 3810 | } |
@@ -4244,7 +4243,7 @@ static int do_journal_end(struct reiserfs_transaction_handle *th, int flags) | |||
4244 | journal->j_start = | 4243 | journal->j_start = |
4245 | (journal->j_start + journal->j_len + | 4244 | (journal->j_start + journal->j_len + |
4246 | 2) % SB_ONDISK_JOURNAL_SIZE(sb); | 4245 | 2) % SB_ONDISK_JOURNAL_SIZE(sb); |
4247 | atomic_set(&(journal->j_wcount), 0); | 4246 | atomic_set(&journal->j_wcount, 0); |
4248 | journal->j_bcount = 0; | 4247 | journal->j_bcount = 0; |
4249 | journal->j_last = NULL; | 4248 | journal->j_last = NULL; |
4250 | journal->j_first = NULL; | 4249 | journal->j_first = NULL; |
@@ -4349,11 +4348,11 @@ first_jl: | |||
4349 | "could not get a list bitmap"); | 4348 | "could not get a list bitmap"); |
4350 | } | 4349 | } |
4351 | 4350 | ||
4352 | atomic_set(&(journal->j_jlock), 0); | 4351 | atomic_set(&journal->j_jlock, 0); |
4353 | unlock_journal(sb); | 4352 | unlock_journal(sb); |
4354 | /* wake up any body waiting to join. */ | 4353 | /* wake up any body waiting to join. */ |
4355 | clear_bit(J_WRITERS_QUEUED, &journal->j_state); | 4354 | clear_bit(J_WRITERS_QUEUED, &journal->j_state); |
4356 | wake_up(&(journal->j_join_wait)); | 4355 | wake_up(&journal->j_join_wait); |
4357 | 4356 | ||
4358 | if (!flush && wait_on_commit && | 4357 | if (!flush && wait_on_commit && |
4359 | journal_list_still_alive(sb, commit_trans_id)) { | 4358 | journal_list_still_alive(sb, commit_trans_id)) { |
diff --git a/fs/reiserfs/lbalance.c b/fs/reiserfs/lbalance.c index d48a9e7507a1..d6744c8b24e1 100644 --- a/fs/reiserfs/lbalance.c +++ b/fs/reiserfs/lbalance.c | |||
@@ -38,12 +38,12 @@ static void leaf_copy_dir_entries(struct buffer_info *dest_bi, | |||
38 | */ | 38 | */ |
39 | deh = B_I_DEH(source, ih); | 39 | deh = B_I_DEH(source, ih); |
40 | if (copy_count) { | 40 | if (copy_count) { |
41 | copy_records_len = (from ? deh_location(&(deh[from - 1])) : | 41 | copy_records_len = (from ? deh_location(&deh[from - 1]) : |
42 | ih_item_len(ih)) - | 42 | ih_item_len(ih)) - |
43 | deh_location(&(deh[from + copy_count - 1])); | 43 | deh_location(&deh[from + copy_count - 1]); |
44 | records = | 44 | records = |
45 | source->b_data + ih_location(ih) + | 45 | source->b_data + ih_location(ih) + |
46 | deh_location(&(deh[from + copy_count - 1])); | 46 | deh_location(&deh[from + copy_count - 1]); |
47 | } else { | 47 | } else { |
48 | copy_records_len = 0; | 48 | copy_records_len = 0; |
49 | records = NULL; | 49 | records = NULL; |
@@ -81,7 +81,7 @@ static void leaf_copy_dir_entries(struct buffer_info *dest_bi, | |||
81 | /* form key by the following way */ | 81 | /* form key by the following way */ |
82 | if (from < ih_entry_count(ih)) { | 82 | if (from < ih_entry_count(ih)) { |
83 | set_le_ih_k_offset(&new_ih, | 83 | set_le_ih_k_offset(&new_ih, |
84 | deh_offset(&(deh[from]))); | 84 | deh_offset(&deh[from])); |
85 | } else { | 85 | } else { |
86 | /* | 86 | /* |
87 | * no entries will be copied to this | 87 | * no entries will be copied to this |
@@ -94,7 +94,7 @@ static void leaf_copy_dir_entries(struct buffer_info *dest_bi, | |||
94 | * for it, so we -1 | 94 | * for it, so we -1 |
95 | */ | 95 | */ |
96 | } | 96 | } |
97 | set_le_key_k_type(KEY_FORMAT_3_5, &(new_ih.ih_key), | 97 | set_le_key_k_type(KEY_FORMAT_3_5, &new_ih.ih_key, |
98 | TYPE_DIRENTRY); | 98 | TYPE_DIRENTRY); |
99 | } | 99 | } |
100 | 100 | ||
@@ -155,7 +155,7 @@ static int leaf_copy_boundary_item(struct buffer_info *dest_bi, | |||
155 | 155 | ||
156 | /* there is nothing to merge */ | 156 | /* there is nothing to merge */ |
157 | if (!dest_nr_item | 157 | if (!dest_nr_item |
158 | || (!op_is_left_mergeable(&(ih->ih_key), src->b_size))) | 158 | || (!op_is_left_mergeable(&ih->ih_key, src->b_size))) |
159 | return 0; | 159 | return 0; |
160 | 160 | ||
161 | RFALSE(!ih_item_len(ih), | 161 | RFALSE(!ih_item_len(ih), |
@@ -221,7 +221,7 @@ static int leaf_copy_boundary_item(struct buffer_info *dest_bi, | |||
221 | ih = item_head(src, src_nr_item - 1); | 221 | ih = item_head(src, src_nr_item - 1); |
222 | dih = item_head(dest, 0); | 222 | dih = item_head(dest, 0); |
223 | 223 | ||
224 | if (!dest_nr_item || !op_is_left_mergeable(&(dih->ih_key), src->b_size)) | 224 | if (!dest_nr_item || !op_is_left_mergeable(&dih->ih_key, src->b_size)) |
225 | return 0; | 225 | return 0; |
226 | 226 | ||
227 | if (is_direntry_le_ih(ih)) { | 227 | if (is_direntry_le_ih(ih)) { |
@@ -368,8 +368,8 @@ static void leaf_copy_items_entirely(struct buffer_info *dest_bi, | |||
368 | } | 368 | } |
369 | 369 | ||
370 | /* prepare space for items */ | 370 | /* prepare space for items */ |
371 | last_loc = ih_location(&(ih[nr + cpy_num - 1 - dest_before])); | 371 | last_loc = ih_location(&ih[nr + cpy_num - 1 - dest_before]); |
372 | last_inserted_loc = ih_location(&(ih[cpy_num - 1])); | 372 | last_inserted_loc = ih_location(&ih[cpy_num - 1]); |
373 | 373 | ||
374 | /* check free space */ | 374 | /* check free space */ |
375 | RFALSE(free_space < j - last_inserted_loc, | 375 | RFALSE(free_space < j - last_inserted_loc, |
@@ -449,7 +449,7 @@ static void leaf_item_bottle(struct buffer_info *dest_bi, | |||
449 | set_ih_free_space(&n_ih, 0); | 449 | set_ih_free_space(&n_ih, 0); |
450 | } | 450 | } |
451 | 451 | ||
452 | RFALSE(op_is_left_mergeable(&(ih->ih_key), src->b_size), | 452 | RFALSE(op_is_left_mergeable(&ih->ih_key, src->b_size), |
453 | "vs-10190: bad mergeability of item %h", ih); | 453 | "vs-10190: bad mergeability of item %h", ih); |
454 | n_ih.ih_version = ih->ih_version; /* JDM Endian safe, both le */ | 454 | n_ih.ih_version = ih->ih_version; /* JDM Endian safe, both le */ |
455 | leaf_insert_into_buf(dest_bi, B_NR_ITEMS(dest), &n_ih, | 455 | leaf_insert_into_buf(dest_bi, B_NR_ITEMS(dest), &n_ih, |
@@ -926,7 +926,7 @@ void leaf_insert_into_buf(struct buffer_info *bi, int before, | |||
926 | ih = item_head(bh, before); | 926 | ih = item_head(bh, before); |
927 | 927 | ||
928 | /* prepare space for the body of new item */ | 928 | /* prepare space for the body of new item */ |
929 | last_loc = nr ? ih_location(&(ih[nr - before - 1])) : bh->b_size; | 929 | last_loc = nr ? ih_location(&ih[nr - before - 1]) : bh->b_size; |
930 | unmoved_loc = before ? ih_location(ih - 1) : bh->b_size; | 930 | unmoved_loc = before ? ih_location(ih - 1) : bh->b_size; |
931 | 931 | ||
932 | memmove(bh->b_data + last_loc - ih_item_len(inserted_item_ih), | 932 | memmove(bh->b_data + last_loc - ih_item_len(inserted_item_ih), |
@@ -949,8 +949,8 @@ void leaf_insert_into_buf(struct buffer_info *bi, int before, | |||
949 | 949 | ||
950 | /* change locations */ | 950 | /* change locations */ |
951 | for (i = before; i < nr + 1; i++) { | 951 | for (i = before; i < nr + 1; i++) { |
952 | unmoved_loc -= ih_item_len(&(ih[i - before])); | 952 | unmoved_loc -= ih_item_len(&ih[i - before]); |
953 | put_ih_location(&(ih[i - before]), unmoved_loc); | 953 | put_ih_location(&ih[i - before], unmoved_loc); |
954 | } | 954 | } |
955 | 955 | ||
956 | /* sizes, free space, item number */ | 956 | /* sizes, free space, item number */ |
@@ -1009,7 +1009,7 @@ void leaf_paste_in_buffer(struct buffer_info *bi, int affected_item_num, | |||
1009 | /* item to be appended */ | 1009 | /* item to be appended */ |
1010 | ih = item_head(bh, affected_item_num); | 1010 | ih = item_head(bh, affected_item_num); |
1011 | 1011 | ||
1012 | last_loc = ih_location(&(ih[nr - affected_item_num - 1])); | 1012 | last_loc = ih_location(&ih[nr - affected_item_num - 1]); |
1013 | unmoved_loc = affected_item_num ? ih_location(ih - 1) : bh->b_size; | 1013 | unmoved_loc = affected_item_num ? ih_location(ih - 1) : bh->b_size; |
1014 | 1014 | ||
1015 | /* prepare space */ | 1015 | /* prepare space */ |
@@ -1018,8 +1018,8 @@ void leaf_paste_in_buffer(struct buffer_info *bi, int affected_item_num, | |||
1018 | 1018 | ||
1019 | /* change locations */ | 1019 | /* change locations */ |
1020 | for (i = affected_item_num; i < nr; i++) | 1020 | for (i = affected_item_num; i < nr; i++) |
1021 | put_ih_location(&(ih[i - affected_item_num]), | 1021 | put_ih_location(&ih[i - affected_item_num], |
1022 | ih_location(&(ih[i - affected_item_num])) - | 1022 | ih_location(&ih[i - affected_item_num]) - |
1023 | paste_size); | 1023 | paste_size); |
1024 | 1024 | ||
1025 | if (body) { | 1025 | if (body) { |
@@ -1101,19 +1101,19 @@ static int leaf_cut_entries(struct buffer_head *bh, | |||
1101 | * (prev_record) and length of all removed records (cut_records_len) | 1101 | * (prev_record) and length of all removed records (cut_records_len) |
1102 | */ | 1102 | */ |
1103 | prev_record_offset = | 1103 | prev_record_offset = |
1104 | (from ? deh_location(&(deh[from - 1])) : ih_item_len(ih)); | 1104 | (from ? deh_location(&deh[from - 1]) : ih_item_len(ih)); |
1105 | cut_records_len = prev_record_offset /*from_record */ - | 1105 | cut_records_len = prev_record_offset /*from_record */ - |
1106 | deh_location(&(deh[from + del_count - 1])); | 1106 | deh_location(&deh[from + del_count - 1]); |
1107 | prev_record = item + prev_record_offset; | 1107 | prev_record = item + prev_record_offset; |
1108 | 1108 | ||
1109 | /* adjust locations of remaining entries */ | 1109 | /* adjust locations of remaining entries */ |
1110 | for (i = ih_entry_count(ih) - 1; i > from + del_count - 1; i--) | 1110 | for (i = ih_entry_count(ih) - 1; i > from + del_count - 1; i--) |
1111 | put_deh_location(&(deh[i]), | 1111 | put_deh_location(&deh[i], |
1112 | deh_location(&deh[i]) - | 1112 | deh_location(&deh[i]) - |
1113 | (DEH_SIZE * del_count)); | 1113 | (DEH_SIZE * del_count)); |
1114 | 1114 | ||
1115 | for (i = 0; i < from; i++) | 1115 | for (i = 0; i < from; i++) |
1116 | put_deh_location(&(deh[i]), | 1116 | put_deh_location(&deh[i], |
1117 | deh_location(&deh[i]) - (DEH_SIZE * del_count + | 1117 | deh_location(&deh[i]) - (DEH_SIZE * del_count + |
1118 | cut_records_len)); | 1118 | cut_records_len)); |
1119 | 1119 | ||
@@ -1200,7 +1200,7 @@ void leaf_cut_from_buffer(struct buffer_info *bi, int cut_item_num, | |||
1200 | } | 1200 | } |
1201 | 1201 | ||
1202 | /* location of the last item */ | 1202 | /* location of the last item */ |
1203 | last_loc = ih_location(&(ih[nr - cut_item_num - 1])); | 1203 | last_loc = ih_location(&ih[nr - cut_item_num - 1]); |
1204 | 1204 | ||
1205 | /* location of the item, which is remaining at the same place */ | 1205 | /* location of the item, which is remaining at the same place */ |
1206 | unmoved_loc = cut_item_num ? ih_location(ih - 1) : bh->b_size; | 1206 | unmoved_loc = cut_item_num ? ih_location(ih - 1) : bh->b_size; |
@@ -1219,7 +1219,7 @@ void leaf_cut_from_buffer(struct buffer_info *bi, int cut_item_num, | |||
1219 | 1219 | ||
1220 | /* change locations */ | 1220 | /* change locations */ |
1221 | for (i = cut_item_num; i < nr; i++) | 1221 | for (i = cut_item_num; i < nr; i++) |
1222 | put_ih_location(&(ih[i - cut_item_num]), | 1222 | put_ih_location(&ih[i - cut_item_num], |
1223 | ih_location(&ih[i - cut_item_num]) + cut_size); | 1223 | ih_location(&ih[i - cut_item_num]) + cut_size); |
1224 | 1224 | ||
1225 | /* size, free space */ | 1225 | /* size, free space */ |
@@ -1273,8 +1273,8 @@ static void leaf_delete_items_entirely(struct buffer_info *bi, | |||
1273 | j = (first == 0) ? bh->b_size : ih_location(ih - 1); | 1273 | j = (first == 0) ? bh->b_size : ih_location(ih - 1); |
1274 | 1274 | ||
1275 | /* delete items */ | 1275 | /* delete items */ |
1276 | last_loc = ih_location(&(ih[nr - 1 - first])); | 1276 | last_loc = ih_location(&ih[nr - 1 - first]); |
1277 | last_removed_loc = ih_location(&(ih[del_num - 1])); | 1277 | last_removed_loc = ih_location(&ih[del_num - 1]); |
1278 | 1278 | ||
1279 | memmove(bh->b_data + last_loc + j - last_removed_loc, | 1279 | memmove(bh->b_data + last_loc + j - last_removed_loc, |
1280 | bh->b_data + last_loc, last_removed_loc - last_loc); | 1280 | bh->b_data + last_loc, last_removed_loc - last_loc); |
@@ -1284,8 +1284,8 @@ static void leaf_delete_items_entirely(struct buffer_info *bi, | |||
1284 | 1284 | ||
1285 | /* change item location */ | 1285 | /* change item location */ |
1286 | for (i = first; i < nr - del_num; i++) | 1286 | for (i = first; i < nr - del_num; i++) |
1287 | put_ih_location(&(ih[i - first]), | 1287 | put_ih_location(&ih[i - first], |
1288 | ih_location(&(ih[i - first])) + (j - | 1288 | ih_location(&ih[i - first]) + (j - |
1289 | last_removed_loc)); | 1289 | last_removed_loc)); |
1290 | 1290 | ||
1291 | /* sizes, item number */ | 1291 | /* sizes, item number */ |
@@ -1347,19 +1347,19 @@ void leaf_paste_entries(struct buffer_info *bi, | |||
1347 | /* new records will be pasted at this point */ | 1347 | /* new records will be pasted at this point */ |
1348 | insert_point = | 1348 | insert_point = |
1349 | item + | 1349 | item + |
1350 | (before ? deh_location(&(deh[before - 1])) | 1350 | (before ? deh_location(&deh[before - 1]) |
1351 | : (ih_item_len(ih) - paste_size)); | 1351 | : (ih_item_len(ih) - paste_size)); |
1352 | 1352 | ||
1353 | /* adjust locations of records that will be AFTER new records */ | 1353 | /* adjust locations of records that will be AFTER new records */ |
1354 | for (i = ih_entry_count(ih) - 1; i >= before; i--) | 1354 | for (i = ih_entry_count(ih) - 1; i >= before; i--) |
1355 | put_deh_location(&(deh[i]), | 1355 | put_deh_location(&deh[i], |
1356 | deh_location(&(deh[i])) + | 1356 | deh_location(&deh[i]) + |
1357 | (DEH_SIZE * new_entry_count)); | 1357 | (DEH_SIZE * new_entry_count)); |
1358 | 1358 | ||
1359 | /* adjust locations of records that will be BEFORE new records */ | 1359 | /* adjust locations of records that will be BEFORE new records */ |
1360 | for (i = 0; i < before; i++) | 1360 | for (i = 0; i < before; i++) |
1361 | put_deh_location(&(deh[i]), | 1361 | put_deh_location(&deh[i], |
1362 | deh_location(&(deh[i])) + paste_size); | 1362 | deh_location(&deh[i]) + paste_size); |
1363 | 1363 | ||
1364 | old_entry_num = ih_entry_count(ih); | 1364 | old_entry_num = ih_entry_count(ih); |
1365 | put_ih_entry_count(ih, ih_entry_count(ih) + new_entry_count); | 1365 | put_ih_entry_count(ih, ih_entry_count(ih) + new_entry_count); |
@@ -1383,10 +1383,10 @@ void leaf_paste_entries(struct buffer_info *bi, | |||
1383 | 1383 | ||
1384 | /* set locations of new records */ | 1384 | /* set locations of new records */ |
1385 | for (i = 0; i < new_entry_count; i++) { | 1385 | for (i = 0; i < new_entry_count; i++) { |
1386 | put_deh_location(&(deh[i]), | 1386 | put_deh_location(&deh[i], |
1387 | deh_location(&(deh[i])) + | 1387 | deh_location(&deh[i]) + |
1388 | (-deh_location | 1388 | (-deh_location |
1389 | (&(new_dehs[new_entry_count - 1])) + | 1389 | (&new_dehs[new_entry_count - 1]) + |
1390 | insert_point + DEH_SIZE * new_entry_count - | 1390 | insert_point + DEH_SIZE * new_entry_count - |
1391 | item)); | 1391 | item)); |
1392 | } | 1392 | } |
@@ -1404,16 +1404,16 @@ void leaf_paste_entries(struct buffer_info *bi, | |||
1404 | next = | 1404 | next = |
1405 | (i < | 1405 | (i < |
1406 | ih_entry_count(ih) - | 1406 | ih_entry_count(ih) - |
1407 | 1) ? deh_location(&(deh[i + 1])) : 0; | 1407 | 1) ? deh_location(&deh[i + 1]) : 0; |
1408 | prev = (i != 0) ? deh_location(&(deh[i - 1])) : 0; | 1408 | prev = (i != 0) ? deh_location(&deh[i - 1]) : 0; |
1409 | 1409 | ||
1410 | if (prev && prev <= deh_location(&(deh[i]))) | 1410 | if (prev && prev <= deh_location(&deh[i])) |
1411 | reiserfs_error(sb_from_bi(bi), "vs-10240", | 1411 | reiserfs_error(sb_from_bi(bi), "vs-10240", |
1412 | "directory item (%h) " | 1412 | "directory item (%h) " |
1413 | "corrupted (prev %a, " | 1413 | "corrupted (prev %a, " |
1414 | "cur(%d) %a)", | 1414 | "cur(%d) %a)", |
1415 | ih, deh + i - 1, i, deh + i); | 1415 | ih, deh + i - 1, i, deh + i); |
1416 | if (next && next >= deh_location(&(deh[i]))) | 1416 | if (next && next >= deh_location(&deh[i])) |
1417 | reiserfs_error(sb_from_bi(bi), "vs-10250", | 1417 | reiserfs_error(sb_from_bi(bi), "vs-10250", |
1418 | "directory item (%h) " | 1418 | "directory item (%h) " |
1419 | "corrupted (cur(%d) %a, " | 1419 | "corrupted (cur(%d) %a, " |
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index ebae36db94a0..cd11358b10c7 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c | |||
@@ -86,8 +86,8 @@ inline void set_de_name_and_namelen(struct reiserfs_dir_entry *de) | |||
86 | static inline void set_de_object_key(struct reiserfs_dir_entry *de) | 86 | static inline void set_de_object_key(struct reiserfs_dir_entry *de) |
87 | { | 87 | { |
88 | BUG_ON(de->de_entry_num >= ih_entry_count(de->de_ih)); | 88 | BUG_ON(de->de_entry_num >= ih_entry_count(de->de_ih)); |
89 | de->de_dir_id = deh_dir_id(&(de->de_deh[de->de_entry_num])); | 89 | de->de_dir_id = deh_dir_id(&de->de_deh[de->de_entry_num]); |
90 | de->de_objectid = deh_objectid(&(de->de_deh[de->de_entry_num])); | 90 | de->de_objectid = deh_objectid(&de->de_deh[de->de_entry_num]); |
91 | } | 91 | } |
92 | 92 | ||
93 | static inline void store_de_entry_key(struct reiserfs_dir_entry *de) | 93 | static inline void store_de_entry_key(struct reiserfs_dir_entry *de) |
@@ -102,8 +102,8 @@ static inline void store_de_entry_key(struct reiserfs_dir_entry *de) | |||
102 | le32_to_cpu(de->de_ih->ih_key.k_dir_id); | 102 | le32_to_cpu(de->de_ih->ih_key.k_dir_id); |
103 | de->de_entry_key.on_disk_key.k_objectid = | 103 | de->de_entry_key.on_disk_key.k_objectid = |
104 | le32_to_cpu(de->de_ih->ih_key.k_objectid); | 104 | le32_to_cpu(de->de_ih->ih_key.k_objectid); |
105 | set_cpu_key_k_offset(&(de->de_entry_key), deh_offset(deh)); | 105 | set_cpu_key_k_offset(&de->de_entry_key, deh_offset(deh)); |
106 | set_cpu_key_k_type(&(de->de_entry_key), TYPE_DIRENTRY); | 106 | set_cpu_key_k_type(&de->de_entry_key, TYPE_DIRENTRY); |
107 | } | 107 | } |
108 | 108 | ||
109 | /* | 109 | /* |
@@ -149,7 +149,7 @@ int search_by_entry_key(struct super_block *sb, const struct cpu_key *key, | |||
149 | 149 | ||
150 | #ifdef CONFIG_REISERFS_CHECK | 150 | #ifdef CONFIG_REISERFS_CHECK |
151 | if (!is_direntry_le_ih(de->de_ih) || | 151 | if (!is_direntry_le_ih(de->de_ih) || |
152 | COMP_SHORT_KEYS(&(de->de_ih->ih_key), key)) { | 152 | COMP_SHORT_KEYS(&de->de_ih->ih_key, key)) { |
153 | print_block(de->de_bh, 0, -1, -1); | 153 | print_block(de->de_bh, 0, -1, -1); |
154 | reiserfs_panic(sb, "vs-7005", "found item %h is not directory " | 154 | reiserfs_panic(sb, "vs-7005", "found item %h is not directory " |
155 | "item or does not belong to the same directory " | 155 | "item or does not belong to the same directory " |
@@ -369,7 +369,7 @@ static struct dentry *reiserfs_lookup(struct inode *dir, struct dentry *dentry, | |||
369 | pathrelse(&path_to_entry); | 369 | pathrelse(&path_to_entry); |
370 | if (retval == NAME_FOUND) { | 370 | if (retval == NAME_FOUND) { |
371 | inode = reiserfs_iget(dir->i_sb, | 371 | inode = reiserfs_iget(dir->i_sb, |
372 | (struct cpu_key *)&(de.de_dir_id)); | 372 | (struct cpu_key *)&de.de_dir_id); |
373 | if (!inode || IS_ERR(inode)) { | 373 | if (!inode || IS_ERR(inode)) { |
374 | reiserfs_write_unlock(dir->i_sb); | 374 | reiserfs_write_unlock(dir->i_sb); |
375 | return ERR_PTR(-EACCES); | 375 | return ERR_PTR(-EACCES); |
@@ -414,7 +414,7 @@ struct dentry *reiserfs_get_parent(struct dentry *child) | |||
414 | reiserfs_write_unlock(dir->i_sb); | 414 | reiserfs_write_unlock(dir->i_sb); |
415 | return ERR_PTR(-ENOENT); | 415 | return ERR_PTR(-ENOENT); |
416 | } | 416 | } |
417 | inode = reiserfs_iget(dir->i_sb, (struct cpu_key *)&(de.de_dir_id)); | 417 | inode = reiserfs_iget(dir->i_sb, (struct cpu_key *)&de.de_dir_id); |
418 | reiserfs_write_unlock(dir->i_sb); | 418 | reiserfs_write_unlock(dir->i_sb); |
419 | 419 | ||
420 | return d_obtain_alias(inode); | 420 | return d_obtain_alias(inode); |
@@ -935,7 +935,8 @@ static int reiserfs_rmdir(struct inode *dir, struct dentry *dentry) | |||
935 | } | 935 | } |
936 | 936 | ||
937 | /* cut entry from dir directory */ | 937 | /* cut entry from dir directory */ |
938 | retval = reiserfs_cut_from_item(&th, &path, &(de.de_entry_key), dir, NULL, /* page */ | 938 | retval = reiserfs_cut_from_item(&th, &path, &de.de_entry_key, |
939 | dir, NULL, /* page */ | ||
939 | 0 /*new file size - not used here */ ); | 940 | 0 /*new file size - not used here */ ); |
940 | if (retval < 0) | 941 | if (retval < 0) |
941 | goto end_rmdir; | 942 | goto end_rmdir; |
@@ -1042,7 +1043,7 @@ static int reiserfs_unlink(struct inode *dir, struct dentry *dentry) | |||
1042 | savelink = inode->i_nlink; | 1043 | savelink = inode->i_nlink; |
1043 | 1044 | ||
1044 | retval = | 1045 | retval = |
1045 | reiserfs_cut_from_item(&th, &path, &(de.de_entry_key), dir, NULL, | 1046 | reiserfs_cut_from_item(&th, &path, &de.de_entry_key, dir, NULL, |
1046 | 0); | 1047 | 0); |
1047 | if (retval < 0) { | 1048 | if (retval < 0) { |
1048 | inc_nlink(inode); | 1049 | inc_nlink(inode); |
@@ -1583,7 +1584,7 @@ static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
1583 | * entry. This needs one more clean up | 1584 | * entry. This needs one more clean up |
1584 | */ | 1585 | */ |
1585 | if (reiserfs_cut_from_item | 1586 | if (reiserfs_cut_from_item |
1586 | (&th, &old_entry_path, &(old_de.de_entry_key), old_dir, NULL, | 1587 | (&th, &old_entry_path, &old_de.de_entry_key, old_dir, NULL, |
1587 | 0) < 0) | 1588 | 0) < 0) |
1588 | reiserfs_error(old_dir->i_sb, "vs-7060", | 1589 | reiserfs_error(old_dir->i_sb, "vs-7060", |
1589 | "couldn't not cut old name. Fsck later?"); | 1590 | "couldn't not cut old name. Fsck later?"); |
diff --git a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c index c7425fdf19f9..c534db47df9f 100644 --- a/fs/reiserfs/prints.c +++ b/fs/reiserfs/prints.c | |||
@@ -652,11 +652,11 @@ void store_print_tb(struct tree_balance *tb) | |||
652 | "* %d * %3lld(%2d) * %3lld(%2d) * %3lld(%2d) * %5lld * %5lld * %5lld * %5lld * %5lld *\n", | 652 | "* %d * %3lld(%2d) * %3lld(%2d) * %3lld(%2d) * %5lld * %5lld * %5lld * %5lld * %5lld *\n", |
653 | h, | 653 | h, |
654 | (tbSh) ? (long long)(tbSh->b_blocknr) : (-1LL), | 654 | (tbSh) ? (long long)(tbSh->b_blocknr) : (-1LL), |
655 | (tbSh) ? atomic_read(&(tbSh->b_count)) : -1, | 655 | (tbSh) ? atomic_read(&tbSh->b_count) : -1, |
656 | (tb->L[h]) ? (long long)(tb->L[h]->b_blocknr) : (-1LL), | 656 | (tb->L[h]) ? (long long)(tb->L[h]->b_blocknr) : (-1LL), |
657 | (tb->L[h]) ? atomic_read(&(tb->L[h]->b_count)) : -1, | 657 | (tb->L[h]) ? atomic_read(&tb->L[h]->b_count) : -1, |
658 | (tb->R[h]) ? (long long)(tb->R[h]->b_blocknr) : (-1LL), | 658 | (tb->R[h]) ? (long long)(tb->R[h]->b_blocknr) : (-1LL), |
659 | (tb->R[h]) ? atomic_read(&(tb->R[h]->b_count)) : -1, | 659 | (tb->R[h]) ? atomic_read(&tb->R[h]->b_count) : -1, |
660 | (tbFh) ? (long long)(tbFh->b_blocknr) : (-1LL), | 660 | (tbFh) ? (long long)(tbFh->b_blocknr) : (-1LL), |
661 | (tb->FL[h]) ? (long long)(tb->FL[h]-> | 661 | (tb->FL[h]) ? (long long)(tb->FL[h]-> |
662 | b_blocknr) : (-1LL), | 662 | b_blocknr) : (-1LL), |
@@ -698,7 +698,7 @@ void store_print_tb(struct tree_balance *tb) | |||
698 | "%p (%llu %d)%s", tb->FEB[i], | 698 | "%p (%llu %d)%s", tb->FEB[i], |
699 | tb->FEB[i] ? (unsigned long long)tb->FEB[i]-> | 699 | tb->FEB[i] ? (unsigned long long)tb->FEB[i]-> |
700 | b_blocknr : 0ULL, | 700 | b_blocknr : 0ULL, |
701 | tb->FEB[i] ? atomic_read(&(tb->FEB[i]->b_count)) : 0, | 701 | tb->FEB[i] ? atomic_read(&tb->FEB[i]->b_count) : 0, |
702 | (i == ARRAY_SIZE(tb->FEB) - 1) ? "\n" : ", "); | 702 | (i == ARRAY_SIZE(tb->FEB) - 1) ? "\n" : ", "); |
703 | 703 | ||
704 | sprintf(print_tb_buf + strlen(print_tb_buf), | 704 | sprintf(print_tb_buf + strlen(print_tb_buf), |
diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c index ebfebc5b7dd6..dfb02febf814 100644 --- a/fs/reiserfs/stree.c +++ b/fs/reiserfs/stree.c | |||
@@ -748,7 +748,7 @@ io_error: | |||
748 | (node_level == | 748 | (node_level == |
749 | DISK_LEAF_NODE_LEVEL) ? IH_SIZE : | 749 | DISK_LEAF_NODE_LEVEL) ? IH_SIZE : |
750 | KEY_SIZE, | 750 | KEY_SIZE, |
751 | &(last_element->pe_position)); | 751 | &last_element->pe_position); |
752 | if (node_level == stop_level) { | 752 | if (node_level == stop_level) { |
753 | return retval; | 753 | return retval; |
754 | } | 754 | } |
@@ -871,9 +871,8 @@ int search_for_position_by_key(struct super_block *sb, | |||
871 | --PATH_LAST_POSITION(search_path)); | 871 | --PATH_LAST_POSITION(search_path)); |
872 | blk_size = sb->s_blocksize; | 872 | blk_size = sb->s_blocksize; |
873 | 873 | ||
874 | if (comp_short_keys(&(p_le_ih->ih_key), p_cpu_key)) { | 874 | if (comp_short_keys(&p_le_ih->ih_key, p_cpu_key)) |
875 | return FILE_NOT_FOUND; | 875 | return FILE_NOT_FOUND; |
876 | } | ||
877 | 876 | ||
878 | /* FIXME: quite ugly this far */ | 877 | /* FIXME: quite ugly this far */ |
879 | 878 | ||
@@ -2088,7 +2087,7 @@ int reiserfs_paste_into_item(struct reiserfs_transaction_handle *th, | |||
2088 | reiserfs_debug(inode->i_sb, REISERFS_DEBUG_CODE, | 2087 | reiserfs_debug(inode->i_sb, REISERFS_DEBUG_CODE, |
2089 | "reiserquota paste_into_item(): allocating %u id=%u type=%c", | 2088 | "reiserquota paste_into_item(): allocating %u id=%u type=%c", |
2090 | pasted_size, inode->i_uid, | 2089 | pasted_size, inode->i_uid, |
2091 | key2type(&(key->on_disk_key))); | 2090 | key2type(&key->on_disk_key)); |
2092 | #endif | 2091 | #endif |
2093 | 2092 | ||
2094 | depth = reiserfs_write_unlock_nested(sb); | 2093 | depth = reiserfs_write_unlock_nested(sb); |
@@ -2150,7 +2149,7 @@ error_out: | |||
2150 | reiserfs_debug(inode->i_sb, REISERFS_DEBUG_CODE, | 2149 | reiserfs_debug(inode->i_sb, REISERFS_DEBUG_CODE, |
2151 | "reiserquota paste_into_item(): freeing %u id=%u type=%c", | 2150 | "reiserquota paste_into_item(): freeing %u id=%u type=%c", |
2152 | pasted_size, inode->i_uid, | 2151 | pasted_size, inode->i_uid, |
2153 | key2type(&(key->on_disk_key))); | 2152 | key2type(&key->on_disk_key)); |
2154 | #endif | 2153 | #endif |
2155 | depth = reiserfs_write_unlock_nested(sb); | 2154 | depth = reiserfs_write_unlock_nested(sb); |
2156 | dquot_free_space_nodirty(inode, pasted_size); | 2155 | dquot_free_space_nodirty(inode, pasted_size); |
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index fa651790b907..e26ec564758f 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -1642,7 +1642,7 @@ static int read_super_block(struct super_block *s, int offset) | |||
1642 | /* after journal replay, reread all bitmap and super blocks */ | 1642 | /* after journal replay, reread all bitmap and super blocks */ |
1643 | static int reread_meta_blocks(struct super_block *s) | 1643 | static int reread_meta_blocks(struct super_block *s) |
1644 | { | 1644 | { |
1645 | ll_rw_block(READ, 1, &(SB_BUFFER_WITH_SB(s))); | 1645 | ll_rw_block(READ, 1, &SB_BUFFER_WITH_SB(s)); |
1646 | wait_on_buffer(SB_BUFFER_WITH_SB(s)); | 1646 | wait_on_buffer(SB_BUFFER_WITH_SB(s)); |
1647 | if (!buffer_uptodate(SB_BUFFER_WITH_SB(s))) { | 1647 | if (!buffer_uptodate(SB_BUFFER_WITH_SB(s))) { |
1648 | reiserfs_warning(s, "reiserfs-2504", "error reading the super"); | 1648 | reiserfs_warning(s, "reiserfs-2504", "error reading the super"); |
@@ -1886,7 +1886,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
1886 | 1886 | ||
1887 | jdev_name = NULL; | 1887 | jdev_name = NULL; |
1888 | if (reiserfs_parse_options | 1888 | if (reiserfs_parse_options |
1889 | (s, (char *)data, &(sbi->s_mount_opt), &blocks, &jdev_name, | 1889 | (s, (char *)data, &sbi->s_mount_opt, &blocks, &jdev_name, |
1890 | &commit_max_age, qf_names, &qfmt) == 0) { | 1890 | &commit_max_age, qf_names, &qfmt) == 0) { |
1891 | goto error_unlocked; | 1891 | goto error_unlocked; |
1892 | } | 1892 | } |
@@ -2003,7 +2003,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
2003 | args.dirid = REISERFS_ROOT_PARENT_OBJECTID; | 2003 | args.dirid = REISERFS_ROOT_PARENT_OBJECTID; |
2004 | root_inode = | 2004 | root_inode = |
2005 | iget5_locked(s, REISERFS_ROOT_OBJECTID, reiserfs_find_actor, | 2005 | iget5_locked(s, REISERFS_ROOT_OBJECTID, reiserfs_find_actor, |
2006 | reiserfs_init_locked_inode, (void *)(&args)); | 2006 | reiserfs_init_locked_inode, (void *)&args); |
2007 | if (!root_inode) { | 2007 | if (!root_inode) { |
2008 | SWARN(silent, s, "jmacd-10", "get root inode failed"); | 2008 | SWARN(silent, s, "jmacd-10", "get root inode failed"); |
2009 | goto error_unlocked; | 2009 | goto error_unlocked; |
@@ -2037,11 +2037,11 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
2037 | 2037 | ||
2038 | if (is_reiserfs_3_5(rs) | 2038 | if (is_reiserfs_3_5(rs) |
2039 | || (is_reiserfs_jr(rs) && SB_VERSION(s) == REISERFS_VERSION_1)) | 2039 | || (is_reiserfs_jr(rs) && SB_VERSION(s) == REISERFS_VERSION_1)) |
2040 | set_bit(REISERFS_3_5, &(sbi->s_properties)); | 2040 | set_bit(REISERFS_3_5, &sbi->s_properties); |
2041 | else if (old_format) | 2041 | else if (old_format) |
2042 | set_bit(REISERFS_OLD_FORMAT, &(sbi->s_properties)); | 2042 | set_bit(REISERFS_OLD_FORMAT, &sbi->s_properties); |
2043 | else | 2043 | else |
2044 | set_bit(REISERFS_3_6, &(sbi->s_properties)); | 2044 | set_bit(REISERFS_3_6, &sbi->s_properties); |
2045 | 2045 | ||
2046 | if (!(s->s_flags & MS_RDONLY)) { | 2046 | if (!(s->s_flags & MS_RDONLY)) { |
2047 | 2047 | ||
@@ -2097,8 +2097,8 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
2097 | 2097 | ||
2098 | set_sb_version(rs, REISERFS_VERSION_2); | 2098 | set_sb_version(rs, REISERFS_VERSION_2); |
2099 | reiserfs_convert_objectid_map_v1(s); | 2099 | reiserfs_convert_objectid_map_v1(s); |
2100 | set_bit(REISERFS_3_6, &(sbi->s_properties)); | 2100 | set_bit(REISERFS_3_6, &sbi->s_properties); |
2101 | clear_bit(REISERFS_3_5, &(sbi->s_properties)); | 2101 | clear_bit(REISERFS_3_5, &sbi->s_properties); |
2102 | } else if (!silent) { | 2102 | } else if (!silent) { |
2103 | reiserfs_info(s, "using 3.5.x disk format\n"); | 2103 | reiserfs_info(s, "using 3.5.x disk format\n"); |
2104 | } | 2104 | } |
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 66a380c2ad39..ca416d099e7d 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c | |||
@@ -1027,8 +1027,8 @@ int reiserfs_xattr_init(struct super_block *s, int mount_flags) | |||
1027 | 1027 | ||
1028 | error: | 1028 | error: |
1029 | if (err) { | 1029 | if (err) { |
1030 | clear_bit(REISERFS_XATTRS_USER, &(REISERFS_SB(s)->s_mount_opt)); | 1030 | clear_bit(REISERFS_XATTRS_USER, &REISERFS_SB(s)->s_mount_opt); |
1031 | clear_bit(REISERFS_POSIXACL, &(REISERFS_SB(s)->s_mount_opt)); | 1031 | clear_bit(REISERFS_POSIXACL, &REISERFS_SB(s)->s_mount_opt); |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | /* The super_block MS_POSIXACL must mirror the (no)acl mount option. */ | 1034 | /* The super_block MS_POSIXACL must mirror the (no)acl mount option. */ |