diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2006-10-09 19:48:10 -0400 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-12-01 21:28:08 -0500 |
commit | 02dc1af44e9fa4b8801169891b3a1ba4047537ad (patch) | |
tree | db84e9ec9731dcfcf91bea226403881d0feccb49 /fs/ocfs2 | |
parent | 4bcec1847ac4f75c2ee6d091b495f34d8d822e6a (diff) |
ocfs2: pass ocfs2_super * into ocfs2_commit_trans()
This sets us up to remove handle->journal.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/alloc.c | 8 | ||||
-rw-r--r-- | fs/ocfs2/aops.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/dir.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/file.c | 12 | ||||
-rw-r--r-- | fs/ocfs2/inode.c | 6 | ||||
-rw-r--r-- | fs/ocfs2/ioctl.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/journal.c | 5 | ||||
-rw-r--r-- | fs/ocfs2/journal.h | 3 | ||||
-rw-r--r-- | fs/ocfs2/localalloc.c | 6 | ||||
-rw-r--r-- | fs/ocfs2/namei.c | 10 | ||||
-rw-r--r-- | fs/ocfs2/suballoc.c | 2 |
11 files changed, 31 insertions, 29 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 22dd60833c9b..f3dbd31a85a1 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -1170,7 +1170,7 @@ static int __ocfs2_flush_truncate_log(struct ocfs2_super *osb) | |||
1170 | if (status < 0) | 1170 | if (status < 0) |
1171 | mlog_errno(status); | 1171 | mlog_errno(status); |
1172 | 1172 | ||
1173 | ocfs2_commit_trans(handle); | 1173 | ocfs2_commit_trans(osb, handle); |
1174 | 1174 | ||
1175 | out_unlock: | 1175 | out_unlock: |
1176 | brelse(data_alloc_bh); | 1176 | brelse(data_alloc_bh); |
@@ -1379,7 +1379,7 @@ int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb, | |||
1379 | 1379 | ||
1380 | status = ocfs2_truncate_log_append(osb, handle, | 1380 | status = ocfs2_truncate_log_append(osb, handle, |
1381 | start_blk, clusters); | 1381 | start_blk, clusters); |
1382 | ocfs2_commit_trans(handle); | 1382 | ocfs2_commit_trans(osb, handle); |
1383 | if (status < 0) { | 1383 | if (status < 0) { |
1384 | mlog_errno(status); | 1384 | mlog_errno(status); |
1385 | goto bail_up; | 1385 | goto bail_up; |
@@ -1883,7 +1883,7 @@ start: | |||
1883 | mutex_unlock(&tl_inode->i_mutex); | 1883 | mutex_unlock(&tl_inode->i_mutex); |
1884 | tl_sem = 0; | 1884 | tl_sem = 0; |
1885 | 1885 | ||
1886 | ocfs2_commit_trans(handle); | 1886 | ocfs2_commit_trans(osb, handle); |
1887 | handle = NULL; | 1887 | handle = NULL; |
1888 | 1888 | ||
1889 | BUG_ON(le32_to_cpu(fe->i_clusters) < target_i_clusters); | 1889 | BUG_ON(le32_to_cpu(fe->i_clusters) < target_i_clusters); |
@@ -1898,7 +1898,7 @@ bail: | |||
1898 | mutex_unlock(&tl_inode->i_mutex); | 1898 | mutex_unlock(&tl_inode->i_mutex); |
1899 | 1899 | ||
1900 | if (handle) | 1900 | if (handle) |
1901 | ocfs2_commit_trans(handle); | 1901 | ocfs2_commit_trans(osb, handle); |
1902 | 1902 | ||
1903 | if (last_eb_bh) | 1903 | if (last_eb_bh) |
1904 | brelse(last_eb_bh); | 1904 | brelse(last_eb_bh); |
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 196a71cb9764..c36939996946 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -382,7 +382,7 @@ struct ocfs2_journal_handle *ocfs2_start_walk_page_trans(struct inode *inode, | |||
382 | out: | 382 | out: |
383 | if (ret) { | 383 | if (ret) { |
384 | if (handle) | 384 | if (handle) |
385 | ocfs2_commit_trans(handle); | 385 | ocfs2_commit_trans(osb, handle); |
386 | handle = ERR_PTR(ret); | 386 | handle = ERR_PTR(ret); |
387 | } | 387 | } |
388 | return handle; | 388 | return handle; |
@@ -464,7 +464,7 @@ static int ocfs2_commit_write(struct file *file, struct page *page, | |||
464 | } | 464 | } |
465 | 465 | ||
466 | out_commit: | 466 | out_commit: |
467 | ocfs2_commit_trans(handle); | 467 | ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle); |
468 | out_unlock_data: | 468 | out_unlock_data: |
469 | ocfs2_data_unlock(inode, 1); | 469 | ocfs2_data_unlock(inode, 1); |
470 | out_unlock_meta: | 470 | out_unlock_meta: |
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index db46ee505782..2bda5f345216 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c | |||
@@ -488,7 +488,7 @@ static int ocfs2_extend_dir(struct ocfs2_super *osb, | |||
488 | get_bh(*new_de_bh); | 488 | get_bh(*new_de_bh); |
489 | bail: | 489 | bail: |
490 | if (handle) | 490 | if (handle) |
491 | ocfs2_commit_trans(handle); | 491 | ocfs2_commit_trans(osb, handle); |
492 | 492 | ||
493 | if (data_ac) | 493 | if (data_ac) |
494 | ocfs2_free_alloc_context(data_ac); | 494 | ocfs2_free_alloc_context(data_ac); |
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index bcae2693e957..9eb60f21968d 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -178,7 +178,7 @@ static int ocfs2_simple_size_update(struct inode *inode, | |||
178 | if (ret < 0) | 178 | if (ret < 0) |
179 | mlog_errno(ret); | 179 | mlog_errno(ret); |
180 | 180 | ||
181 | ocfs2_commit_trans(handle); | 181 | ocfs2_commit_trans(osb, handle); |
182 | out: | 182 | out: |
183 | return ret; | 183 | return ret; |
184 | } | 184 | } |
@@ -207,7 +207,7 @@ static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb, | |||
207 | if (status < 0) | 207 | if (status < 0) |
208 | mlog_errno(status); | 208 | mlog_errno(status); |
209 | 209 | ||
210 | ocfs2_commit_trans(handle); | 210 | ocfs2_commit_trans(osb, handle); |
211 | out: | 211 | out: |
212 | mlog_exit(status); | 212 | mlog_exit(status); |
213 | return status; | 213 | return status; |
@@ -576,7 +576,7 @@ leave: | |||
576 | drop_alloc_sem = 0; | 576 | drop_alloc_sem = 0; |
577 | } | 577 | } |
578 | if (handle) { | 578 | if (handle) { |
579 | ocfs2_commit_trans(handle); | 579 | ocfs2_commit_trans(osb, handle); |
580 | handle = NULL; | 580 | handle = NULL; |
581 | } | 581 | } |
582 | if (data_ac) { | 582 | if (data_ac) { |
@@ -655,7 +655,7 @@ static int ocfs2_write_zero_page(struct inode *inode, | |||
655 | ret = 0; | 655 | ret = 0; |
656 | 656 | ||
657 | if (handle) | 657 | if (handle) |
658 | ocfs2_commit_trans(handle); | 658 | ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle); |
659 | out_unlock: | 659 | out_unlock: |
660 | unlock_page(page); | 660 | unlock_page(page); |
661 | page_cache_release(page); | 661 | page_cache_release(page); |
@@ -850,7 +850,7 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) | |||
850 | mlog_errno(status); | 850 | mlog_errno(status); |
851 | 851 | ||
852 | bail_commit: | 852 | bail_commit: |
853 | ocfs2_commit_trans(handle); | 853 | ocfs2_commit_trans(osb, handle); |
854 | bail_unlock: | 854 | bail_unlock: |
855 | ocfs2_meta_unlock(inode, 1); | 855 | ocfs2_meta_unlock(inode, 1); |
856 | bail_unlock_rw: | 856 | bail_unlock_rw: |
@@ -938,7 +938,7 @@ static int ocfs2_write_remove_suid(struct inode *inode) | |||
938 | out_bh: | 938 | out_bh: |
939 | brelse(bh); | 939 | brelse(bh); |
940 | out_trans: | 940 | out_trans: |
941 | ocfs2_commit_trans(handle); | 941 | ocfs2_commit_trans(osb, handle); |
942 | out: | 942 | out: |
943 | mlog_exit(ret); | 943 | mlog_exit(ret); |
944 | return ret; | 944 | return ret; |
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index dec0ece6267a..7708c63a3554 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
@@ -538,7 +538,7 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb, | |||
538 | goto bail; | 538 | goto bail; |
539 | } | 539 | } |
540 | 540 | ||
541 | ocfs2_commit_trans(handle); | 541 | ocfs2_commit_trans(osb, handle); |
542 | handle = NULL; | 542 | handle = NULL; |
543 | 543 | ||
544 | status = ocfs2_prepare_truncate(osb, inode, fe_bh, &tc); | 544 | status = ocfs2_prepare_truncate(osb, inode, fe_bh, &tc); |
@@ -554,7 +554,7 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb, | |||
554 | } | 554 | } |
555 | bail: | 555 | bail: |
556 | if (handle) | 556 | if (handle) |
557 | ocfs2_commit_trans(handle); | 557 | ocfs2_commit_trans(osb, handle); |
558 | 558 | ||
559 | mlog_exit(status); | 559 | mlog_exit(status); |
560 | return status; | 560 | return status; |
@@ -629,7 +629,7 @@ static int ocfs2_remove_inode(struct inode *inode, | |||
629 | mlog_errno(status); | 629 | mlog_errno(status); |
630 | 630 | ||
631 | bail_commit: | 631 | bail_commit: |
632 | ocfs2_commit_trans(handle); | 632 | ocfs2_commit_trans(osb, handle); |
633 | bail_unlock: | 633 | bail_unlock: |
634 | ocfs2_meta_unlock(inode_alloc_inode, 1); | 634 | ocfs2_meta_unlock(inode_alloc_inode, 1); |
635 | mutex_unlock(&inode_alloc_inode->i_mutex); | 635 | mutex_unlock(&inode_alloc_inode->i_mutex); |
diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c index 16d8861b281f..e927758e8cd3 100644 --- a/fs/ocfs2/ioctl.c +++ b/fs/ocfs2/ioctl.c | |||
@@ -96,7 +96,7 @@ static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags, | |||
96 | if (status < 0) | 96 | if (status < 0) |
97 | mlog_errno(status); | 97 | mlog_errno(status); |
98 | 98 | ||
99 | ocfs2_commit_trans(handle); | 99 | ocfs2_commit_trans(osb, handle); |
100 | bail_unlock: | 100 | bail_unlock: |
101 | ocfs2_meta_unlock(inode, 1); | 101 | ocfs2_meta_unlock(inode, 1); |
102 | bail: | 102 | bail: |
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 61db8e7fffa5..00402e749fc6 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c | |||
@@ -195,11 +195,12 @@ done_free: | |||
195 | return ERR_PTR(ret); | 195 | return ERR_PTR(ret); |
196 | } | 196 | } |
197 | 197 | ||
198 | void ocfs2_commit_trans(struct ocfs2_journal_handle *handle) | 198 | void ocfs2_commit_trans(struct ocfs2_super *osb, |
199 | struct ocfs2_journal_handle *handle) | ||
199 | { | 200 | { |
200 | handle_t *jbd_handle; | 201 | handle_t *jbd_handle; |
201 | int retval; | 202 | int retval; |
202 | struct ocfs2_journal *journal = handle->journal; | 203 | struct ocfs2_journal *journal = osb->journal; |
203 | 204 | ||
204 | mlog_entry_void(); | 205 | mlog_entry_void(); |
205 | 206 | ||
diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h index 3e64e6b646a9..d315179d0c07 100644 --- a/fs/ocfs2/journal.h +++ b/fs/ocfs2/journal.h | |||
@@ -219,7 +219,8 @@ static inline void ocfs2_checkpoint_inode(struct inode *inode) | |||
219 | struct ocfs2_journal_handle *ocfs2_start_trans(struct ocfs2_super *osb, | 219 | struct ocfs2_journal_handle *ocfs2_start_trans(struct ocfs2_super *osb, |
220 | struct ocfs2_journal_handle *handle, | 220 | struct ocfs2_journal_handle *handle, |
221 | int max_buffs); | 221 | int max_buffs); |
222 | void ocfs2_commit_trans(struct ocfs2_journal_handle *handle); | 222 | void ocfs2_commit_trans(struct ocfs2_super *osb, |
223 | struct ocfs2_journal_handle *handle); | ||
223 | int ocfs2_extend_trans(handle_t *handle, int nblocks); | 224 | int ocfs2_extend_trans(handle_t *handle, int nblocks); |
224 | 225 | ||
225 | /* | 226 | /* |
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index 4c46c0a81e00..9dd208dc5d7a 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c | |||
@@ -280,7 +280,7 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb) | |||
280 | mlog_errno(status); | 280 | mlog_errno(status); |
281 | 281 | ||
282 | out_commit: | 282 | out_commit: |
283 | ocfs2_commit_trans(handle); | 283 | ocfs2_commit_trans(osb, handle); |
284 | 284 | ||
285 | out_unlock: | 285 | out_unlock: |
286 | if (main_bm_bh) | 286 | if (main_bm_bh) |
@@ -421,7 +421,7 @@ int ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb, | |||
421 | if (status < 0) | 421 | if (status < 0) |
422 | mlog_errno(status); | 422 | mlog_errno(status); |
423 | 423 | ||
424 | ocfs2_commit_trans(handle); | 424 | ocfs2_commit_trans(osb, handle); |
425 | 425 | ||
426 | out_unlock: | 426 | out_unlock: |
427 | ocfs2_meta_unlock(main_bm_inode, 1); | 427 | ocfs2_meta_unlock(main_bm_inode, 1); |
@@ -954,7 +954,7 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb, | |||
954 | status = 0; | 954 | status = 0; |
955 | bail: | 955 | bail: |
956 | if (handle) | 956 | if (handle) |
957 | ocfs2_commit_trans(handle); | 957 | ocfs2_commit_trans(osb, handle); |
958 | 958 | ||
959 | if (main_bm_bh) | 959 | if (main_bm_bh) |
960 | brelse(main_bm_bh); | 960 | brelse(main_bm_bh); |
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index daf70605afa8..9a56bfdf45c6 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
@@ -440,7 +440,7 @@ static int ocfs2_mknod(struct inode *dir, | |||
440 | status = 0; | 440 | status = 0; |
441 | leave: | 441 | leave: |
442 | if (handle) | 442 | if (handle) |
443 | ocfs2_commit_trans(handle); | 443 | ocfs2_commit_trans(osb, handle); |
444 | 444 | ||
445 | ocfs2_meta_unlock(dir, 1); | 445 | ocfs2_meta_unlock(dir, 1); |
446 | 446 | ||
@@ -746,7 +746,7 @@ static int ocfs2_link(struct dentry *old_dentry, | |||
746 | d_instantiate(dentry, inode); | 746 | d_instantiate(dentry, inode); |
747 | 747 | ||
748 | out_commit: | 748 | out_commit: |
749 | ocfs2_commit_trans(handle); | 749 | ocfs2_commit_trans(osb, handle); |
750 | out_unlock_inode: | 750 | out_unlock_inode: |
751 | ocfs2_meta_unlock(inode, 1); | 751 | ocfs2_meta_unlock(inode, 1); |
752 | 752 | ||
@@ -942,7 +942,7 @@ static int ocfs2_unlink(struct inode *dir, | |||
942 | 942 | ||
943 | leave: | 943 | leave: |
944 | if (handle) | 944 | if (handle) |
945 | ocfs2_commit_trans(handle); | 945 | ocfs2_commit_trans(osb, handle); |
946 | 946 | ||
947 | if (child_locked) | 947 | if (child_locked) |
948 | ocfs2_meta_unlock(inode, 1); | 948 | ocfs2_meta_unlock(inode, 1); |
@@ -1428,7 +1428,7 @@ bail: | |||
1428 | ocfs2_rename_unlock(osb); | 1428 | ocfs2_rename_unlock(osb); |
1429 | 1429 | ||
1430 | if (handle) | 1430 | if (handle) |
1431 | ocfs2_commit_trans(handle); | 1431 | ocfs2_commit_trans(osb, handle); |
1432 | 1432 | ||
1433 | if (parents_locked) | 1433 | if (parents_locked) |
1434 | ocfs2_double_unlock(old_dir, new_dir); | 1434 | ocfs2_double_unlock(old_dir, new_dir); |
@@ -1730,7 +1730,7 @@ static int ocfs2_symlink(struct inode *dir, | |||
1730 | d_instantiate(dentry, inode); | 1730 | d_instantiate(dentry, inode); |
1731 | bail: | 1731 | bail: |
1732 | if (handle) | 1732 | if (handle) |
1733 | ocfs2_commit_trans(handle); | 1733 | ocfs2_commit_trans(osb, handle); |
1734 | 1734 | ||
1735 | ocfs2_meta_unlock(dir, 1); | 1735 | ocfs2_meta_unlock(dir, 1); |
1736 | 1736 | ||
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 27f8dc4c819c..ea63a519167d 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
@@ -387,7 +387,7 @@ static int ocfs2_block_group_alloc(struct ocfs2_super *osb, | |||
387 | status = 0; | 387 | status = 0; |
388 | bail: | 388 | bail: |
389 | if (handle) | 389 | if (handle) |
390 | ocfs2_commit_trans(handle); | 390 | ocfs2_commit_trans(osb, handle); |
391 | 391 | ||
392 | if (ac) | 392 | if (ac) |
393 | ocfs2_free_alloc_context(ac); | 393 | ocfs2_free_alloc_context(ac); |