diff options
-rw-r--r-- | fs/ext4/ext4_jbd2.h | 7 | ||||
-rw-r--r-- | fs/ext4/resize.c | 17 | ||||
-rw-r--r-- | fs/ext4/xattr.c | 1 | ||||
-rw-r--r-- | fs/jbd2/journal.c | 1 | ||||
-rw-r--r-- | fs/jbd2/transaction.c | 11 | ||||
-rw-r--r-- | include/linux/jbd2.h | 1 |
6 files changed, 3 insertions, 35 deletions
diff --git a/fs/ext4/ext4_jbd2.h b/fs/ext4/ext4_jbd2.h index 56d258c18303..7177f9b21cb2 100644 --- a/fs/ext4/ext4_jbd2.h +++ b/fs/ext4/ext4_jbd2.h | |||
@@ -254,13 +254,6 @@ static inline void ext4_handle_sync(handle_t *handle) | |||
254 | handle->h_sync = 1; | 254 | handle->h_sync = 1; |
255 | } | 255 | } |
256 | 256 | ||
257 | static inline void ext4_handle_release_buffer(handle_t *handle, | ||
258 | struct buffer_head *bh) | ||
259 | { | ||
260 | if (ext4_handle_valid(handle)) | ||
261 | jbd2_journal_release_buffer(handle, bh); | ||
262 | } | ||
263 | |||
264 | static inline int ext4_handle_is_aborted(handle_t *handle) | 257 | static inline int ext4_handle_is_aborted(handle_t *handle) |
265 | { | 258 | { |
266 | if (ext4_handle_valid(handle)) | 259 | if (ext4_handle_valid(handle)) |
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 47bf06a2765d..d99387b89edd 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c | |||
@@ -783,7 +783,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, | |||
783 | 783 | ||
784 | err = ext4_journal_get_write_access(handle, gdb_bh); | 784 | err = ext4_journal_get_write_access(handle, gdb_bh); |
785 | if (unlikely(err)) | 785 | if (unlikely(err)) |
786 | goto exit_sbh; | 786 | goto exit_dind; |
787 | 787 | ||
788 | err = ext4_journal_get_write_access(handle, dind); | 788 | err = ext4_journal_get_write_access(handle, dind); |
789 | if (unlikely(err)) | 789 | if (unlikely(err)) |
@@ -792,7 +792,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, | |||
792 | /* ext4_reserve_inode_write() gets a reference on the iloc */ | 792 | /* ext4_reserve_inode_write() gets a reference on the iloc */ |
793 | err = ext4_reserve_inode_write(handle, inode, &iloc); | 793 | err = ext4_reserve_inode_write(handle, inode, &iloc); |
794 | if (unlikely(err)) | 794 | if (unlikely(err)) |
795 | goto exit_dindj; | 795 | goto exit_dind; |
796 | 796 | ||
797 | n_group_desc = ext4_kvmalloc((gdb_num + 1) * | 797 | n_group_desc = ext4_kvmalloc((gdb_num + 1) * |
798 | sizeof(struct buffer_head *), | 798 | sizeof(struct buffer_head *), |
@@ -846,12 +846,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, | |||
846 | 846 | ||
847 | exit_inode: | 847 | exit_inode: |
848 | ext4_kvfree(n_group_desc); | 848 | ext4_kvfree(n_group_desc); |
849 | /* ext4_handle_release_buffer(handle, iloc.bh); */ | ||
850 | brelse(iloc.bh); | 849 | brelse(iloc.bh); |
851 | exit_dindj: | ||
852 | /* ext4_handle_release_buffer(handle, dind); */ | ||
853 | exit_sbh: | ||
854 | /* ext4_handle_release_buffer(handle, EXT4_SB(sb)->s_sbh); */ | ||
855 | exit_dind: | 850 | exit_dind: |
856 | brelse(dind); | 851 | brelse(dind); |
857 | exit_bh: | 852 | exit_bh: |
@@ -969,14 +964,8 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode, | |||
969 | } | 964 | } |
970 | 965 | ||
971 | for (i = 0; i < reserved_gdb; i++) { | 966 | for (i = 0; i < reserved_gdb; i++) { |
972 | if ((err = ext4_journal_get_write_access(handle, primary[i]))) { | 967 | if ((err = ext4_journal_get_write_access(handle, primary[i]))) |
973 | /* | ||
974 | int j; | ||
975 | for (j = 0; j < i; j++) | ||
976 | ext4_handle_release_buffer(handle, primary[j]); | ||
977 | */ | ||
978 | goto exit_bh; | 968 | goto exit_bh; |
979 | } | ||
980 | } | 969 | } |
981 | 970 | ||
982 | if ((err = ext4_reserve_inode_write(handle, inode, &iloc))) | 971 | if ((err = ext4_reserve_inode_write(handle, inode, &iloc))) |
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 2cdb98d62980..b1adda1b750d 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c | |||
@@ -794,7 +794,6 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode, | |||
794 | int offset = (char *)s->here - bs->bh->b_data; | 794 | int offset = (char *)s->here - bs->bh->b_data; |
795 | 795 | ||
796 | unlock_buffer(bs->bh); | 796 | unlock_buffer(bs->bh); |
797 | ext4_handle_release_buffer(handle, bs->bh); | ||
798 | if (ce) { | 797 | if (ce) { |
799 | mb_cache_entry_release(ce); | 798 | mb_cache_entry_release(ce); |
800 | ce = NULL; | 799 | ce = NULL; |
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 484b8d1c6cb6..dbf41f9452db 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
@@ -60,7 +60,6 @@ EXPORT_SYMBOL(jbd2_journal_get_create_access); | |||
60 | EXPORT_SYMBOL(jbd2_journal_get_undo_access); | 60 | EXPORT_SYMBOL(jbd2_journal_get_undo_access); |
61 | EXPORT_SYMBOL(jbd2_journal_set_triggers); | 61 | EXPORT_SYMBOL(jbd2_journal_set_triggers); |
62 | EXPORT_SYMBOL(jbd2_journal_dirty_metadata); | 62 | EXPORT_SYMBOL(jbd2_journal_dirty_metadata); |
63 | EXPORT_SYMBOL(jbd2_journal_release_buffer); | ||
64 | EXPORT_SYMBOL(jbd2_journal_forget); | 63 | EXPORT_SYMBOL(jbd2_journal_forget); |
65 | #if 0 | 64 | #if 0 |
66 | EXPORT_SYMBOL(journal_sync_buffer); | 65 | EXPORT_SYMBOL(journal_sync_buffer); |
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index a74ba4659549..deffd945c8e2 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c | |||
@@ -1207,17 +1207,6 @@ out: | |||
1207 | return ret; | 1207 | return ret; |
1208 | } | 1208 | } |
1209 | 1209 | ||
1210 | /* | ||
1211 | * jbd2_journal_release_buffer: undo a get_write_access without any buffer | ||
1212 | * updates, if the update decided in the end that it didn't need access. | ||
1213 | * | ||
1214 | */ | ||
1215 | void | ||
1216 | jbd2_journal_release_buffer(handle_t *handle, struct buffer_head *bh) | ||
1217 | { | ||
1218 | BUFFER_TRACE(bh, "entry"); | ||
1219 | } | ||
1220 | |||
1221 | /** | 1210 | /** |
1222 | * void jbd2_journal_forget() - bforget() for potentially-journaled buffers. | 1211 | * void jbd2_journal_forget() - bforget() for potentially-journaled buffers. |
1223 | * @handle: transaction handle | 1212 | * @handle: transaction handle |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 3efc43f3f162..de7f55682088 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -1096,7 +1096,6 @@ extern int jbd2_journal_get_undo_access(handle_t *, struct buffer_head *); | |||
1096 | void jbd2_journal_set_triggers(struct buffer_head *, | 1096 | void jbd2_journal_set_triggers(struct buffer_head *, |
1097 | struct jbd2_buffer_trigger_type *type); | 1097 | struct jbd2_buffer_trigger_type *type); |
1098 | extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *); | 1098 | extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *); |
1099 | extern void jbd2_journal_release_buffer (handle_t *, struct buffer_head *); | ||
1100 | extern int jbd2_journal_forget (handle_t *, struct buffer_head *); | 1099 | extern int jbd2_journal_forget (handle_t *, struct buffer_head *); |
1101 | extern void journal_sync_buffer (struct buffer_head *); | 1100 | extern void journal_sync_buffer (struct buffer_head *); |
1102 | extern void jbd2_journal_invalidatepage(journal_t *, | 1101 | extern void jbd2_journal_invalidatepage(journal_t *, |