diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2006-10-06 21:51:46 -0400 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-12-01 21:27:55 -0500 |
commit | 02928a71ae6da6e3e205d99e1fa1a1f598ddb62d (patch) | |
tree | 0b45c363c0e77cf32fd20a4bc30e6405c5250059 /fs/ocfs2/journal.c | |
parent | 85b9e783cbc8cf4acc7bfaa76f37ea26b426f514 (diff) |
ocfs2: remove unused ocfs2_handle_add_inode()
We can also delete the unused infrastructure which was once in place to
support this functionality. ocfs2_inode_private loses ip_handle and
ip_handle_list. ocfs2_journal_handle loses handle_list.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/journal.c')
-rw-r--r-- | fs/ocfs2/journal.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index ca6f2094b006..f02af63e5fae 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c | |||
@@ -128,7 +128,6 @@ struct ocfs2_journal_handle *ocfs2_alloc_handle(struct ocfs2_super *osb) | |||
128 | retval->k_handle = NULL; | 128 | retval->k_handle = NULL; |
129 | 129 | ||
130 | INIT_LIST_HEAD(&retval->locks); | 130 | INIT_LIST_HEAD(&retval->locks); |
131 | INIT_LIST_HEAD(&retval->inode_list); | ||
132 | retval->journal = osb->journal; | 131 | retval->journal = osb->journal; |
133 | 132 | ||
134 | return retval; | 133 | return retval; |
@@ -202,51 +201,12 @@ done_free: | |||
202 | return ERR_PTR(ret); | 201 | return ERR_PTR(ret); |
203 | } | 202 | } |
204 | 203 | ||
205 | void ocfs2_handle_add_inode(struct ocfs2_journal_handle *handle, | ||
206 | struct inode *inode) | ||
207 | { | ||
208 | BUG_ON(!handle); | ||
209 | BUG_ON(!inode); | ||
210 | |||
211 | atomic_inc(&inode->i_count); | ||
212 | |||
213 | /* we're obviously changing it... */ | ||
214 | mutex_lock(&inode->i_mutex); | ||
215 | |||
216 | /* sanity check */ | ||
217 | BUG_ON(OCFS2_I(inode)->ip_handle); | ||
218 | BUG_ON(!list_empty(&OCFS2_I(inode)->ip_handle_list)); | ||
219 | |||
220 | OCFS2_I(inode)->ip_handle = handle; | ||
221 | list_move_tail(&(OCFS2_I(inode)->ip_handle_list), &(handle->inode_list)); | ||
222 | } | ||
223 | |||
224 | static void ocfs2_handle_unlock_inodes(struct ocfs2_journal_handle *handle) | ||
225 | { | ||
226 | struct list_head *p, *n; | ||
227 | struct inode *inode; | ||
228 | struct ocfs2_inode_info *oi; | ||
229 | |||
230 | list_for_each_safe(p, n, &handle->inode_list) { | ||
231 | oi = list_entry(p, struct ocfs2_inode_info, | ||
232 | ip_handle_list); | ||
233 | inode = &oi->vfs_inode; | ||
234 | |||
235 | OCFS2_I(inode)->ip_handle = NULL; | ||
236 | list_del_init(&OCFS2_I(inode)->ip_handle_list); | ||
237 | |||
238 | mutex_unlock(&inode->i_mutex); | ||
239 | iput(inode); | ||
240 | } | ||
241 | } | ||
242 | |||
243 | /* This is trivial so we do it out of the main commit | 204 | /* This is trivial so we do it out of the main commit |
244 | * paths. Beware, it can be called from start_trans too! */ | 205 | * paths. Beware, it can be called from start_trans too! */ |
245 | static void ocfs2_commit_unstarted_handle(struct ocfs2_journal_handle *handle) | 206 | static void ocfs2_commit_unstarted_handle(struct ocfs2_journal_handle *handle) |
246 | { | 207 | { |
247 | mlog_entry_void(); | 208 | mlog_entry_void(); |
248 | 209 | ||
249 | ocfs2_handle_unlock_inodes(handle); | ||
250 | /* You are allowed to add journal locks before the transaction | 210 | /* You are allowed to add journal locks before the transaction |
251 | * has started. */ | 211 | * has started. */ |
252 | ocfs2_handle_cleanup_locks(handle->journal, handle); | 212 | ocfs2_handle_cleanup_locks(handle->journal, handle); |
@@ -272,9 +232,6 @@ void ocfs2_commit_trans(struct ocfs2_journal_handle *handle) | |||
272 | return; | 232 | return; |
273 | } | 233 | } |
274 | 234 | ||
275 | /* release inode semaphores we took during this transaction */ | ||
276 | ocfs2_handle_unlock_inodes(handle); | ||
277 | |||
278 | /* ocfs2_extend_trans may have had to call journal_restart | 235 | /* ocfs2_extend_trans may have had to call journal_restart |
279 | * which will always commit the transaction, but may return | 236 | * which will always commit the transaction, but may return |
280 | * error for any number of reasons. If this is the case, we | 237 | * error for any number of reasons. If this is the case, we |