diff options
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/ext4_jbd2.c | 14 | ||||
-rw-r--r-- | fs/ext4/ext4_jbd2.h | 5 | ||||
-rw-r--r-- | fs/ext4/mballoc.c | 12 |
3 files changed, 4 insertions, 27 deletions
diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c index 6e272ef6ba96..f5240aa15601 100644 --- a/fs/ext4/ext4_jbd2.c +++ b/fs/ext4/ext4_jbd2.c | |||
@@ -6,20 +6,6 @@ | |||
6 | 6 | ||
7 | #include <trace/events/ext4.h> | 7 | #include <trace/events/ext4.h> |
8 | 8 | ||
9 | int __ext4_journal_get_undo_access(const char *where, unsigned int line, | ||
10 | handle_t *handle, struct buffer_head *bh) | ||
11 | { | ||
12 | int err = 0; | ||
13 | |||
14 | if (ext4_handle_valid(handle)) { | ||
15 | err = jbd2_journal_get_undo_access(handle, bh); | ||
16 | if (err) | ||
17 | ext4_journal_abort_handle(where, line, __func__, bh, | ||
18 | handle, err); | ||
19 | } | ||
20 | return err; | ||
21 | } | ||
22 | |||
23 | int __ext4_journal_get_write_access(const char *where, unsigned int line, | 9 | int __ext4_journal_get_write_access(const char *where, unsigned int line, |
24 | handle_t *handle, struct buffer_head *bh) | 10 | handle_t *handle, struct buffer_head *bh) |
25 | { | 11 | { |
diff --git a/fs/ext4/ext4_jbd2.h b/fs/ext4/ext4_jbd2.h index d0f53538a57f..bb85757689b6 100644 --- a/fs/ext4/ext4_jbd2.h +++ b/fs/ext4/ext4_jbd2.h | |||
@@ -126,9 +126,6 @@ void ext4_journal_abort_handle(const char *caller, unsigned int line, | |||
126 | const char *err_fn, | 126 | const char *err_fn, |
127 | struct buffer_head *bh, handle_t *handle, int err); | 127 | struct buffer_head *bh, handle_t *handle, int err); |
128 | 128 | ||
129 | int __ext4_journal_get_undo_access(const char *where, unsigned int line, | ||
130 | handle_t *handle, struct buffer_head *bh); | ||
131 | |||
132 | int __ext4_journal_get_write_access(const char *where, unsigned int line, | 129 | int __ext4_journal_get_write_access(const char *where, unsigned int line, |
133 | handle_t *handle, struct buffer_head *bh); | 130 | handle_t *handle, struct buffer_head *bh); |
134 | 131 | ||
@@ -146,8 +143,6 @@ int __ext4_handle_dirty_metadata(const char *where, unsigned int line, | |||
146 | int __ext4_handle_dirty_super(const char *where, unsigned int line, | 143 | int __ext4_handle_dirty_super(const char *where, unsigned int line, |
147 | handle_t *handle, struct super_block *sb); | 144 | handle_t *handle, struct super_block *sb); |
148 | 145 | ||
149 | #define ext4_journal_get_undo_access(handle, bh) \ | ||
150 | __ext4_journal_get_undo_access(__func__, __LINE__, (handle), (bh)) | ||
151 | #define ext4_journal_get_write_access(handle, bh) \ | 146 | #define ext4_journal_get_write_access(handle, bh) \ |
152 | __ext4_journal_get_write_access(__func__, __LINE__, (handle), (bh)) | 147 | __ext4_journal_get_write_access(__func__, __LINE__, (handle), (bh)) |
153 | #define ext4_forget(handle, is_metadata, inode, bh, block_nr) \ | 148 | #define ext4_forget(handle, is_metadata, inode, bh, block_nr) \ |
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 92aa05ddef66..307d447bbc43 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -4732,9 +4732,9 @@ void ext4_add_groupblocks(handle_t *handle, struct super_block *sb, | |||
4732 | * Check to see if we are freeing blocks across a group | 4732 | * Check to see if we are freeing blocks across a group |
4733 | * boundary. | 4733 | * boundary. |
4734 | */ | 4734 | */ |
4735 | if (bit + count > EXT4_BLOCKS_PER_GROUP(sb)) { | 4735 | if (bit + count > EXT4_BLOCKS_PER_GROUP(sb)) |
4736 | goto error_return; | 4736 | goto error_return; |
4737 | } | 4737 | |
4738 | bitmap_bh = ext4_read_block_bitmap(sb, block_group); | 4738 | bitmap_bh = ext4_read_block_bitmap(sb, block_group); |
4739 | if (!bitmap_bh) | 4739 | if (!bitmap_bh) |
4740 | goto error_return; | 4740 | goto error_return; |
@@ -4753,12 +4753,8 @@ void ext4_add_groupblocks(handle_t *handle, struct super_block *sb, | |||
4753 | goto error_return; | 4753 | goto error_return; |
4754 | } | 4754 | } |
4755 | 4755 | ||
4756 | /* | 4756 | BUFFER_TRACE(bitmap_bh, "getting write access"); |
4757 | * We are about to add blocks to the bitmap, | 4757 | err = ext4_journal_get_write_access(handle, bitmap_bh); |
4758 | * so we need undo access. | ||
4759 | */ | ||
4760 | BUFFER_TRACE(bitmap_bh, "getting undo access"); | ||
4761 | err = ext4_journal_get_undo_access(handle, bitmap_bh); | ||
4762 | if (err) | 4758 | if (err) |
4763 | goto error_return; | 4759 | goto error_return; |
4764 | 4760 | ||