diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-28 13:31:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-28 13:31:42 -0400 |
commit | 5619a693965b291315685bdfe01a0246ebd7e41e (patch) | |
tree | 80a9869814d601a3d5fb439d6c6e4d6c7d6865e4 /fs/xfs/xfs_trans_inode.c | |
parent | 37be944a0270402f9cda291a930b0286f6dc92f5 (diff) | |
parent | 9e4c109ac822395e0aae650e4e3c9e4903f6602f (diff) |
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs: (69 commits)
xfs: add AIL pushing tracepoints
xfs: put in missed fix for merge problem
xfs: do not flush data workqueues in xfs_flush_buftarg
xfs: remove XFS_bflush
xfs: remove xfs_buf_target_name
xfs: use xfs_ioerror_alert in xfs_buf_iodone_callbacks
xfs: clean up xfs_ioerror_alert
xfs: clean up buffer allocation
xfs: remove buffers from the delwri list in xfs_buf_stale
xfs: remove XFS_BUF_STALE and XFS_BUF_SUPER_STALE
xfs: remove XFS_BUF_SET_VTYPE and XFS_BUF_SET_VTYPE_REF
xfs: remove XFS_BUF_FINISH_IOWAIT
xfs: remove xfs_get_buftarg_list
xfs: fix buffer flushing during unmount
xfs: optimize fsync on directories
xfs: reduce the number of log forces from tail pushing
xfs: Don't allocate new buffers on every call to _xfs_buf_find
xfs: simplify xfs_trans_ijoin* again
xfs: unlock the inode before log force in xfs_change_file_space
xfs: unlock the inode before log force in xfs_fs_nfs_commit_metadata
...
Diffstat (limited to 'fs/xfs/xfs_trans_inode.c')
-rw-r--r-- | fs/xfs/xfs_trans_inode.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/fs/xfs/xfs_trans_inode.c b/fs/xfs/xfs_trans_inode.c index c8dea2fd7e68..32f0288ae10f 100644 --- a/fs/xfs/xfs_trans_inode.c +++ b/fs/xfs/xfs_trans_inode.c | |||
@@ -47,11 +47,13 @@ xfs_trans_inode_broot_debug( | |||
47 | * Add a locked inode to the transaction. | 47 | * Add a locked inode to the transaction. |
48 | * | 48 | * |
49 | * The inode must be locked, and it cannot be associated with any transaction. | 49 | * The inode must be locked, and it cannot be associated with any transaction. |
50 | * If lock_flags is non-zero the inode will be unlocked on transaction commit. | ||
50 | */ | 51 | */ |
51 | void | 52 | void |
52 | xfs_trans_ijoin( | 53 | xfs_trans_ijoin( |
53 | struct xfs_trans *tp, | 54 | struct xfs_trans *tp, |
54 | struct xfs_inode *ip) | 55 | struct xfs_inode *ip, |
56 | uint lock_flags) | ||
55 | { | 57 | { |
56 | xfs_inode_log_item_t *iip; | 58 | xfs_inode_log_item_t *iip; |
57 | 59 | ||
@@ -59,7 +61,9 @@ xfs_trans_ijoin( | |||
59 | if (ip->i_itemp == NULL) | 61 | if (ip->i_itemp == NULL) |
60 | xfs_inode_item_init(ip, ip->i_mount); | 62 | xfs_inode_item_init(ip, ip->i_mount); |
61 | iip = ip->i_itemp; | 63 | iip = ip->i_itemp; |
64 | |||
62 | ASSERT(iip->ili_lock_flags == 0); | 65 | ASSERT(iip->ili_lock_flags == 0); |
66 | iip->ili_lock_flags = lock_flags; | ||
63 | 67 | ||
64 | /* | 68 | /* |
65 | * Get a log_item_desc to point at the new item. | 69 | * Get a log_item_desc to point at the new item. |
@@ -70,25 +74,6 @@ xfs_trans_ijoin( | |||
70 | } | 74 | } |
71 | 75 | ||
72 | /* | 76 | /* |
73 | * Add a locked inode to the transaction. | ||
74 | * | ||
75 | * | ||
76 | * Grabs a reference to the inode which will be dropped when the transaction | ||
77 | * is committed. The inode will also be unlocked at that point. The inode | ||
78 | * must be locked, and it cannot be associated with any transaction. | ||
79 | */ | ||
80 | void | ||
81 | xfs_trans_ijoin_ref( | ||
82 | struct xfs_trans *tp, | ||
83 | struct xfs_inode *ip, | ||
84 | uint lock_flags) | ||
85 | { | ||
86 | xfs_trans_ijoin(tp, ip); | ||
87 | IHOLD(ip); | ||
88 | ip->i_itemp->ili_lock_flags = lock_flags; | ||
89 | } | ||
90 | |||
91 | /* | ||
92 | * Transactional inode timestamp update. Requires the inode to be locked and | 77 | * Transactional inode timestamp update. Requires the inode to be locked and |
93 | * joined to the transaction supplied. Relies on the transaction subsystem to | 78 | * joined to the transaction supplied. Relies on the transaction subsystem to |
94 | * track dirty state and update/writeback the inode accordingly. | 79 | * track dirty state and update/writeback the inode accordingly. |