diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/quota/xfs_trans_dquot.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_bmap.c | 35 | ||||
-rw-r--r-- | fs/xfs/xfs_inode.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_inode.h | 1 | ||||
-rw-r--r-- | fs/xfs/xfs_inode_item.c | 13 | ||||
-rw-r--r-- | fs/xfs/xfs_trans_inode.c | 9 |
6 files changed, 24 insertions, 39 deletions
diff --git a/fs/xfs/quota/xfs_trans_dquot.c b/fs/xfs/quota/xfs_trans_dquot.c index 2a3648731331..24084edb7803 100644 --- a/fs/xfs/quota/xfs_trans_dquot.c +++ b/fs/xfs/quota/xfs_trans_dquot.c | |||
@@ -59,7 +59,7 @@ xfs_trans_dqjoin( | |||
59 | xfs_trans_add_item(tp, &dqp->q_logitem.qli_item); | 59 | xfs_trans_add_item(tp, &dqp->q_logitem.qli_item); |
60 | 60 | ||
61 | /* | 61 | /* |
62 | * Initialize i_transp so we can later determine if this dquot is | 62 | * Initialize d_transp so we can later determine if this dquot is |
63 | * associated with this transaction. | 63 | * associated with this transaction. |
64 | */ | 64 | */ |
65 | dqp->q_transp = tp; | 65 | dqp->q_transp = tp; |
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index e546a33214c9..7b46b78ba3f0 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c | |||
@@ -94,6 +94,7 @@ xfs_bmap_add_attrfork_local( | |||
94 | */ | 94 | */ |
95 | STATIC int /* error */ | 95 | STATIC int /* error */ |
96 | xfs_bmap_add_extent_delay_real( | 96 | xfs_bmap_add_extent_delay_real( |
97 | struct xfs_trans *tp, /* transaction pointer */ | ||
97 | xfs_inode_t *ip, /* incore inode pointer */ | 98 | xfs_inode_t *ip, /* incore inode pointer */ |
98 | xfs_extnum_t *idx, /* extent number to update/insert */ | 99 | xfs_extnum_t *idx, /* extent number to update/insert */ |
99 | xfs_btree_cur_t **curp, /* if *curp is null, not a btree */ | 100 | xfs_btree_cur_t **curp, /* if *curp is null, not a btree */ |
@@ -439,6 +440,7 @@ xfs_bmap_add_attrfork_local( | |||
439 | */ | 440 | */ |
440 | STATIC int /* error */ | 441 | STATIC int /* error */ |
441 | xfs_bmap_add_extent( | 442 | xfs_bmap_add_extent( |
443 | struct xfs_trans *tp, /* transaction pointer */ | ||
442 | xfs_inode_t *ip, /* incore inode pointer */ | 444 | xfs_inode_t *ip, /* incore inode pointer */ |
443 | xfs_extnum_t *idx, /* extent number to update/insert */ | 445 | xfs_extnum_t *idx, /* extent number to update/insert */ |
444 | xfs_btree_cur_t **curp, /* if *curp is null, not a btree */ | 446 | xfs_btree_cur_t **curp, /* if *curp is null, not a btree */ |
@@ -524,7 +526,7 @@ xfs_bmap_add_extent( | |||
524 | if (cur) | 526 | if (cur) |
525 | ASSERT(cur->bc_private.b.flags & | 527 | ASSERT(cur->bc_private.b.flags & |
526 | XFS_BTCUR_BPRV_WASDEL); | 528 | XFS_BTCUR_BPRV_WASDEL); |
527 | error = xfs_bmap_add_extent_delay_real(ip, | 529 | error = xfs_bmap_add_extent_delay_real(tp, ip, |
528 | idx, &cur, new, &da_new, | 530 | idx, &cur, new, &da_new, |
529 | first, flist, &logflags); | 531 | first, flist, &logflags); |
530 | } else { | 532 | } else { |
@@ -561,7 +563,7 @@ xfs_bmap_add_extent( | |||
561 | int tmp_logflags; /* partial log flag return val */ | 563 | int tmp_logflags; /* partial log flag return val */ |
562 | 564 | ||
563 | ASSERT(cur == NULL); | 565 | ASSERT(cur == NULL); |
564 | error = xfs_bmap_extents_to_btree(ip->i_transp, ip, first, | 566 | error = xfs_bmap_extents_to_btree(tp, ip, first, |
565 | flist, &cur, da_old > 0, &tmp_logflags, whichfork); | 567 | flist, &cur, da_old > 0, &tmp_logflags, whichfork); |
566 | logflags |= tmp_logflags; | 568 | logflags |= tmp_logflags; |
567 | if (error) | 569 | if (error) |
@@ -604,6 +606,7 @@ done: | |||
604 | */ | 606 | */ |
605 | STATIC int /* error */ | 607 | STATIC int /* error */ |
606 | xfs_bmap_add_extent_delay_real( | 608 | xfs_bmap_add_extent_delay_real( |
609 | struct xfs_trans *tp, /* transaction pointer */ | ||
607 | xfs_inode_t *ip, /* incore inode pointer */ | 610 | xfs_inode_t *ip, /* incore inode pointer */ |
608 | xfs_extnum_t *idx, /* extent number to update/insert */ | 611 | xfs_extnum_t *idx, /* extent number to update/insert */ |
609 | xfs_btree_cur_t **curp, /* if *curp is null, not a btree */ | 612 | xfs_btree_cur_t **curp, /* if *curp is null, not a btree */ |
@@ -901,7 +904,7 @@ xfs_bmap_add_extent_delay_real( | |||
901 | } | 904 | } |
902 | if (ip->i_d.di_format == XFS_DINODE_FMT_EXTENTS && | 905 | if (ip->i_d.di_format == XFS_DINODE_FMT_EXTENTS && |
903 | ip->i_d.di_nextents > ip->i_df.if_ext_max) { | 906 | ip->i_d.di_nextents > ip->i_df.if_ext_max) { |
904 | error = xfs_bmap_extents_to_btree(ip->i_transp, ip, | 907 | error = xfs_bmap_extents_to_btree(tp, ip, |
905 | first, flist, &cur, 1, &tmp_rval, | 908 | first, flist, &cur, 1, &tmp_rval, |
906 | XFS_DATA_FORK); | 909 | XFS_DATA_FORK); |
907 | rval |= tmp_rval; | 910 | rval |= tmp_rval; |
@@ -984,7 +987,7 @@ xfs_bmap_add_extent_delay_real( | |||
984 | } | 987 | } |
985 | if (ip->i_d.di_format == XFS_DINODE_FMT_EXTENTS && | 988 | if (ip->i_d.di_format == XFS_DINODE_FMT_EXTENTS && |
986 | ip->i_d.di_nextents > ip->i_df.if_ext_max) { | 989 | ip->i_d.di_nextents > ip->i_df.if_ext_max) { |
987 | error = xfs_bmap_extents_to_btree(ip->i_transp, ip, | 990 | error = xfs_bmap_extents_to_btree(tp, ip, |
988 | first, flist, &cur, 1, &tmp_rval, | 991 | first, flist, &cur, 1, &tmp_rval, |
989 | XFS_DATA_FORK); | 992 | XFS_DATA_FORK); |
990 | rval |= tmp_rval; | 993 | rval |= tmp_rval; |
@@ -1052,7 +1055,7 @@ xfs_bmap_add_extent_delay_real( | |||
1052 | } | 1055 | } |
1053 | if (ip->i_d.di_format == XFS_DINODE_FMT_EXTENTS && | 1056 | if (ip->i_d.di_format == XFS_DINODE_FMT_EXTENTS && |
1054 | ip->i_d.di_nextents > ip->i_df.if_ext_max) { | 1057 | ip->i_d.di_nextents > ip->i_df.if_ext_max) { |
1055 | error = xfs_bmap_extents_to_btree(ip->i_transp, ip, | 1058 | error = xfs_bmap_extents_to_btree(tp, ip, |
1056 | first, flist, &cur, 1, &tmp_rval, | 1059 | first, flist, &cur, 1, &tmp_rval, |
1057 | XFS_DATA_FORK); | 1060 | XFS_DATA_FORK); |
1058 | rval |= tmp_rval; | 1061 | rval |= tmp_rval; |
@@ -2871,8 +2874,8 @@ xfs_bmap_del_extent( | |||
2871 | len = del->br_blockcount; | 2874 | len = del->br_blockcount; |
2872 | do_div(bno, mp->m_sb.sb_rextsize); | 2875 | do_div(bno, mp->m_sb.sb_rextsize); |
2873 | do_div(len, mp->m_sb.sb_rextsize); | 2876 | do_div(len, mp->m_sb.sb_rextsize); |
2874 | if ((error = xfs_rtfree_extent(ip->i_transp, bno, | 2877 | error = xfs_rtfree_extent(tp, bno, (xfs_extlen_t)len); |
2875 | (xfs_extlen_t)len))) | 2878 | if (error) |
2876 | goto done; | 2879 | goto done; |
2877 | do_fx = 0; | 2880 | do_fx = 0; |
2878 | nblks = len * mp->m_sb.sb_rextsize; | 2881 | nblks = len * mp->m_sb.sb_rextsize; |
@@ -4662,7 +4665,7 @@ xfs_bmapi( | |||
4662 | if (!wasdelay && (flags & XFS_BMAPI_PREALLOC)) | 4665 | if (!wasdelay && (flags & XFS_BMAPI_PREALLOC)) |
4663 | got.br_state = XFS_EXT_UNWRITTEN; | 4666 | got.br_state = XFS_EXT_UNWRITTEN; |
4664 | } | 4667 | } |
4665 | error = xfs_bmap_add_extent(ip, &lastx, &cur, &got, | 4668 | error = xfs_bmap_add_extent(tp, ip, &lastx, &cur, &got, |
4666 | firstblock, flist, &tmp_logflags, | 4669 | firstblock, flist, &tmp_logflags, |
4667 | whichfork); | 4670 | whichfork); |
4668 | logflags |= tmp_logflags; | 4671 | logflags |= tmp_logflags; |
@@ -4763,7 +4766,7 @@ xfs_bmapi( | |||
4763 | mval->br_state = (mval->br_state == XFS_EXT_UNWRITTEN) | 4766 | mval->br_state = (mval->br_state == XFS_EXT_UNWRITTEN) |
4764 | ? XFS_EXT_NORM | 4767 | ? XFS_EXT_NORM |
4765 | : XFS_EXT_UNWRITTEN; | 4768 | : XFS_EXT_UNWRITTEN; |
4766 | error = xfs_bmap_add_extent(ip, &lastx, &cur, mval, | 4769 | error = xfs_bmap_add_extent(tp, ip, &lastx, &cur, mval, |
4767 | firstblock, flist, &tmp_logflags, | 4770 | firstblock, flist, &tmp_logflags, |
4768 | whichfork); | 4771 | whichfork); |
4769 | logflags |= tmp_logflags; | 4772 | logflags |= tmp_logflags; |
@@ -5117,7 +5120,7 @@ xfs_bunmapi( | |||
5117 | del.br_blockcount = mod; | 5120 | del.br_blockcount = mod; |
5118 | } | 5121 | } |
5119 | del.br_state = XFS_EXT_UNWRITTEN; | 5122 | del.br_state = XFS_EXT_UNWRITTEN; |
5120 | error = xfs_bmap_add_extent(ip, &lastx, &cur, &del, | 5123 | error = xfs_bmap_add_extent(tp, ip, &lastx, &cur, &del, |
5121 | firstblock, flist, &logflags, | 5124 | firstblock, flist, &logflags, |
5122 | XFS_DATA_FORK); | 5125 | XFS_DATA_FORK); |
5123 | if (error) | 5126 | if (error) |
@@ -5175,18 +5178,18 @@ xfs_bunmapi( | |||
5175 | } | 5178 | } |
5176 | prev.br_state = XFS_EXT_UNWRITTEN; | 5179 | prev.br_state = XFS_EXT_UNWRITTEN; |
5177 | lastx--; | 5180 | lastx--; |
5178 | error = xfs_bmap_add_extent(ip, &lastx, &cur, | 5181 | error = xfs_bmap_add_extent(tp, ip, &lastx, |
5179 | &prev, firstblock, flist, &logflags, | 5182 | &cur, &prev, firstblock, flist, |
5180 | XFS_DATA_FORK); | 5183 | &logflags, XFS_DATA_FORK); |
5181 | if (error) | 5184 | if (error) |
5182 | goto error0; | 5185 | goto error0; |
5183 | goto nodelete; | 5186 | goto nodelete; |
5184 | } else { | 5187 | } else { |
5185 | ASSERT(del.br_state == XFS_EXT_NORM); | 5188 | ASSERT(del.br_state == XFS_EXT_NORM); |
5186 | del.br_state = XFS_EXT_UNWRITTEN; | 5189 | del.br_state = XFS_EXT_UNWRITTEN; |
5187 | error = xfs_bmap_add_extent(ip, &lastx, &cur, | 5190 | error = xfs_bmap_add_extent(tp, ip, &lastx, |
5188 | &del, firstblock, flist, &logflags, | 5191 | &cur, &del, firstblock, flist, |
5189 | XFS_DATA_FORK); | 5192 | &logflags, XFS_DATA_FORK); |
5190 | if (error) | 5193 | if (error) |
5191 | goto error0; | 5194 | goto error0; |
5192 | goto nodelete; | 5195 | goto nodelete; |
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index aa143b870afb..db310f8fb76a 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -1261,7 +1261,6 @@ xfs_itruncate_extents( | |||
1261 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_IOLOCK_EXCL)); | 1261 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_IOLOCK_EXCL)); |
1262 | ASSERT(new_size <= ip->i_size); | 1262 | ASSERT(new_size <= ip->i_size); |
1263 | ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); | 1263 | ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); |
1264 | ASSERT(ip->i_transp == tp); | ||
1265 | ASSERT(ip->i_itemp != NULL); | 1264 | ASSERT(ip->i_itemp != NULL); |
1266 | ASSERT(ip->i_itemp->ili_lock_flags == 0); | 1265 | ASSERT(ip->i_itemp->ili_lock_flags == 0); |
1267 | ASSERT(!XFS_NOT_DQATTACHED(mp, ip)); | 1266 | ASSERT(!XFS_NOT_DQATTACHED(mp, ip)); |
@@ -1436,7 +1435,6 @@ xfs_iunlink( | |||
1436 | 1435 | ||
1437 | ASSERT(ip->i_d.di_nlink == 0); | 1436 | ASSERT(ip->i_d.di_nlink == 0); |
1438 | ASSERT(ip->i_d.di_mode != 0); | 1437 | ASSERT(ip->i_d.di_mode != 0); |
1439 | ASSERT(ip->i_transp == tp); | ||
1440 | 1438 | ||
1441 | mp = tp->t_mountp; | 1439 | mp = tp->t_mountp; |
1442 | 1440 | ||
@@ -1828,7 +1826,6 @@ xfs_ifree( | |||
1828 | xfs_buf_t *ibp; | 1826 | xfs_buf_t *ibp; |
1829 | 1827 | ||
1830 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); | 1828 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); |
1831 | ASSERT(ip->i_transp == tp); | ||
1832 | ASSERT(ip->i_d.di_nlink == 0); | 1829 | ASSERT(ip->i_d.di_nlink == 0); |
1833 | ASSERT(ip->i_d.di_nextents == 0); | 1830 | ASSERT(ip->i_d.di_nextents == 0); |
1834 | ASSERT(ip->i_d.di_anextents == 0); | 1831 | ASSERT(ip->i_d.di_anextents == 0); |
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 6495578efe05..a97644ab945a 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -241,7 +241,6 @@ typedef struct xfs_inode { | |||
241 | xfs_ifork_t i_df; /* data fork */ | 241 | xfs_ifork_t i_df; /* data fork */ |
242 | 242 | ||
243 | /* Transaction and locking information. */ | 243 | /* Transaction and locking information. */ |
244 | struct xfs_trans *i_transp; /* ptr to owning transaction*/ | ||
245 | struct xfs_inode_log_item *i_itemp; /* logging information */ | 244 | struct xfs_inode_log_item *i_itemp; /* logging information */ |
246 | mrlock_t i_lock; /* inode lock */ | 245 | mrlock_t i_lock; /* inode lock */ |
247 | mrlock_t i_iolock; /* inode IO lock */ | 246 | mrlock_t i_iolock; /* inode IO lock */ |
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index b1e88d56069c..a49811a3e5a4 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c | |||
@@ -632,13 +632,8 @@ xfs_inode_item_unlock( | |||
632 | struct xfs_inode *ip = iip->ili_inode; | 632 | struct xfs_inode *ip = iip->ili_inode; |
633 | unsigned short lock_flags; | 633 | unsigned short lock_flags; |
634 | 634 | ||
635 | ASSERT(iip->ili_inode->i_itemp != NULL); | 635 | ASSERT(ip->i_itemp != NULL); |
636 | ASSERT(xfs_isilocked(iip->ili_inode, XFS_ILOCK_EXCL)); | 636 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); |
637 | |||
638 | /* | ||
639 | * Clear the transaction pointer in the inode. | ||
640 | */ | ||
641 | ip->i_transp = NULL; | ||
642 | 637 | ||
643 | /* | 638 | /* |
644 | * If the inode needed a separate buffer with which to log | 639 | * If the inode needed a separate buffer with which to log |
@@ -664,8 +659,8 @@ xfs_inode_item_unlock( | |||
664 | lock_flags = iip->ili_lock_flags; | 659 | lock_flags = iip->ili_lock_flags; |
665 | iip->ili_lock_flags = 0; | 660 | iip->ili_lock_flags = 0; |
666 | if (lock_flags) { | 661 | if (lock_flags) { |
667 | xfs_iunlock(iip->ili_inode, lock_flags); | 662 | xfs_iunlock(ip, lock_flags); |
668 | IRELE(iip->ili_inode); | 663 | IRELE(ip); |
669 | } | 664 | } |
670 | } | 665 | } |
671 | 666 | ||
diff --git a/fs/xfs/xfs_trans_inode.c b/fs/xfs/xfs_trans_inode.c index 048b0c689d3e..c8dea2fd7e68 100644 --- a/fs/xfs/xfs_trans_inode.c +++ b/fs/xfs/xfs_trans_inode.c | |||
@@ -55,7 +55,6 @@ xfs_trans_ijoin( | |||
55 | { | 55 | { |
56 | xfs_inode_log_item_t *iip; | 56 | xfs_inode_log_item_t *iip; |
57 | 57 | ||
58 | ASSERT(ip->i_transp == NULL); | ||
59 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); | 58 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); |
60 | if (ip->i_itemp == NULL) | 59 | if (ip->i_itemp == NULL) |
61 | xfs_inode_item_init(ip, ip->i_mount); | 60 | xfs_inode_item_init(ip, ip->i_mount); |
@@ -68,12 +67,6 @@ xfs_trans_ijoin( | |||
68 | xfs_trans_add_item(tp, &iip->ili_item); | 67 | xfs_trans_add_item(tp, &iip->ili_item); |
69 | 68 | ||
70 | xfs_trans_inode_broot_debug(ip); | 69 | xfs_trans_inode_broot_debug(ip); |
71 | |||
72 | /* | ||
73 | * Initialize i_transp so we can find it with xfs_inode_incore() | ||
74 | * in xfs_trans_iget() above. | ||
75 | */ | ||
76 | ip->i_transp = tp; | ||
77 | } | 70 | } |
78 | 71 | ||
79 | /* | 72 | /* |
@@ -111,7 +104,6 @@ xfs_trans_ichgtime( | |||
111 | 104 | ||
112 | ASSERT(tp); | 105 | ASSERT(tp); |
113 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); | 106 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); |
114 | ASSERT(ip->i_transp == tp); | ||
115 | 107 | ||
116 | tv = current_fs_time(inode->i_sb); | 108 | tv = current_fs_time(inode->i_sb); |
117 | 109 | ||
@@ -140,7 +132,6 @@ xfs_trans_log_inode( | |||
140 | xfs_inode_t *ip, | 132 | xfs_inode_t *ip, |
141 | uint flags) | 133 | uint flags) |
142 | { | 134 | { |
143 | ASSERT(ip->i_transp == tp); | ||
144 | ASSERT(ip->i_itemp != NULL); | 135 | ASSERT(ip->i_itemp != NULL); |
145 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); | 136 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); |
146 | 137 | ||