Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09f1b80b authored by Jeff Mahoney's avatar Jeff Mahoney Committed by Jan Kara
Browse files

reiserfs: cleanup, remove sb argument from journal_mark_dirty



journal_mark_dirty doesn't need a separate sb argument; It's provided
by the transaction handle.

Signed-off-by: default avatarJeff Mahoney <jeffm@suse.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 58d85426
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -256,14 +256,14 @@ static int scan_bitmap_block(struct reiserfs_transaction_handle *th,
				}
				}
			}
			}
			bi->free_count -= (end - *beg);
			bi->free_count -= (end - *beg);
			journal_mark_dirty(th, s, bh);
			journal_mark_dirty(th, bh);
			brelse(bh);
			brelse(bh);


			/* free block count calculation */
			/* free block count calculation */
			reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s),
			reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s),
						     1);
						     1);
			PUT_SB_FREE_BLOCKS(s, SB_FREE_BLOCKS(s) - (end - *beg));
			PUT_SB_FREE_BLOCKS(s, SB_FREE_BLOCKS(s) - (end - *beg));
			journal_mark_dirty(th, s, SB_BUFFER_WITH_SB(s));
			journal_mark_dirty(th, SB_BUFFER_WITH_SB(s));


			return end - (*beg);
			return end - (*beg);
		} else {
		} else {
@@ -453,14 +453,14 @@ static void _reiserfs_free_block(struct reiserfs_transaction_handle *th,
			       "block %lu: bit already cleared", block);
			       "block %lu: bit already cleared", block);
	}
	}
	apbi[nr].free_count++;
	apbi[nr].free_count++;
	journal_mark_dirty(th, s, bmbh);
	journal_mark_dirty(th, bmbh);
	brelse(bmbh);
	brelse(bmbh);


	reiserfs_prepare_for_journal(s, sbh, 1);
	reiserfs_prepare_for_journal(s, sbh, 1);
	/* update super block */
	/* update super block */
	set_sb_free_blocks(rs, sb_free_blocks(rs) + 1);
	set_sb_free_blocks(rs, sb_free_blocks(rs) + 1);


	journal_mark_dirty(th, s, sbh);
	journal_mark_dirty(th, sbh);
	if (for_unformatted) {
	if (for_unformatted) {
		int depth = reiserfs_write_unlock_nested(s);
		int depth = reiserfs_write_unlock_nested(s);
		dquot_free_block_nodirty(inode, 1);
		dquot_free_block_nodirty(inode, 1);
+1 −2
Original line number Original line Diff line number Diff line
@@ -56,8 +56,7 @@ static inline void buffer_info_init_bh(struct tree_balance *tb,
inline void do_balance_mark_leaf_dirty(struct tree_balance *tb,
inline void do_balance_mark_leaf_dirty(struct tree_balance *tb,
				       struct buffer_head *bh, int flag)
				       struct buffer_head *bh, int flag)
{
{
	journal_mark_dirty(tb->transaction_handle,
	journal_mark_dirty(tb->transaction_handle, bh);
			   tb->transaction_handle->t_super, bh);
}
}


#define do_balance_mark_internal_dirty do_balance_mark_leaf_dirty
#define do_balance_mark_internal_dirty do_balance_mark_leaf_dirty
+1 −1
Original line number Original line Diff line number Diff line
@@ -212,7 +212,7 @@ int reiserfs_commit_page(struct inode *inode, struct page *page,
			set_buffer_uptodate(bh);
			set_buffer_uptodate(bh);
			if (logit) {
			if (logit) {
				reiserfs_prepare_for_journal(s, bh, 1);
				reiserfs_prepare_for_journal(s, bh, 1);
				journal_mark_dirty(&th, s, bh);
				journal_mark_dirty(&th, bh);
			} else if (!buffer_dirty(bh)) {
			} else if (!buffer_dirty(bh)) {
				mark_buffer_dirty(bh);
				mark_buffer_dirty(bh);
				/*
				/*
+1 −1
Original line number Original line Diff line number Diff line
@@ -2572,7 +2572,7 @@ int fix_nodes(int op_mode, struct tree_balance *tb,
	 */
	 */
	reiserfs_prepare_for_journal(tb->tb_sb,
	reiserfs_prepare_for_journal(tb->tb_sb,
				     SB_BUFFER_WITH_SB(tb->tb_sb), 1);
				     SB_BUFFER_WITH_SB(tb->tb_sb), 1);
	journal_mark_dirty(tb->transaction_handle, tb->tb_sb,
	journal_mark_dirty(tb->transaction_handle,
			   SB_BUFFER_WITH_SB(tb->tb_sb));
			   SB_BUFFER_WITH_SB(tb->tb_sb));
	if (FILESYSTEM_CHANGED_TB(tb))
	if (FILESYSTEM_CHANGED_TB(tb))
		return REPEAT_SEARCH;
		return REPEAT_SEARCH;
+4 −4
Original line number Original line Diff line number Diff line
@@ -816,7 +816,7 @@ int reiserfs_get_block(struct inode *inode, sector_t block,
				reiserfs_add_ordered_list(inode, bh_result);
				reiserfs_add_ordered_list(inode, bh_result);
			put_block_num(item, pos_in_item, allocated_block_nr);
			put_block_num(item, pos_in_item, allocated_block_nr);
			unfm_ptr = allocated_block_nr;
			unfm_ptr = allocated_block_nr;
			journal_mark_dirty(th, inode->i_sb, bh);
			journal_mark_dirty(th, bh);
			reiserfs_update_sd(th, inode);
			reiserfs_update_sd(th, inode);
		}
		}
		set_block_dev_mapped(bh_result, unfm_ptr, inode);
		set_block_dev_mapped(bh_result, unfm_ptr, inode);
@@ -1505,7 +1505,7 @@ void reiserfs_update_sd_size(struct reiserfs_transaction_handle *th,
		break;
		break;
	}
	}
	update_stat_data(&path, inode, size);
	update_stat_data(&path, inode, size);
	journal_mark_dirty(th, th->t_super, bh);
	journal_mark_dirty(th, bh);
	pathrelse(&path);
	pathrelse(&path);
	return;
	return;
}
}
@@ -2457,7 +2457,7 @@ static int map_block_for_writepage(struct inode *inode,
		memcpy(ih_item_body(bh, ih) + pos_in_item, p + bytes_copied,
		memcpy(ih_item_body(bh, ih) + pos_in_item, p + bytes_copied,
		       copy_size);
		       copy_size);


		journal_mark_dirty(&th, inode->i_sb, bh);
		journal_mark_dirty(&th, bh);
		bytes_copied += copy_size;
		bytes_copied += copy_size;
		set_block_dev_mapped(bh_result, 0, inode);
		set_block_dev_mapped(bh_result, 0, inode);


@@ -2627,7 +2627,7 @@ static int reiserfs_write_full_page(struct page *page,


		if (checked) {
		if (checked) {
			reiserfs_prepare_for_journal(s, bh, 1);
			reiserfs_prepare_for_journal(s, bh, 1);
			journal_mark_dirty(&th, s, bh);
			journal_mark_dirty(&th, bh);
			continue;
			continue;
		}
		}
		/*
		/*
Loading