aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/file.c
diff options
context:
space:
mode:
authorMark Fasheh <mark.fasheh@oracle.com>2006-10-09 20:26:22 -0400
committerMark Fasheh <mark.fasheh@oracle.com>2006-12-01 21:28:23 -0500
commit65eff9ccf86d63eb5c3e9071450a36e4e4fa9564 (patch)
tree3610e008294ce4e5cfbc9abff3c98153f35ed2d4 /fs/ocfs2/file.c
parentdae85832ffe2879b57b23aea319a0ec17667898d (diff)
ocfs2: remove handle argument to ocfs2_start_trans()
All callers either pass in NULL directly, or a local variable that is already set to NULL. The internals of ocfs2_start_trans() get a nice cleanup as a result. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r--fs/ocfs2/file.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 9eb60f21968d..100754de16b8 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -165,8 +165,7 @@ static int ocfs2_simple_size_update(struct inode *inode,
165 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); 165 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
166 struct ocfs2_journal_handle *handle = NULL; 166 struct ocfs2_journal_handle *handle = NULL;
167 167
168 handle = ocfs2_start_trans(osb, NULL, 168 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
169 OCFS2_INODE_UPDATE_CREDITS);
170 if (handle == NULL) { 169 if (handle == NULL) {
171 ret = -ENOMEM; 170 ret = -ENOMEM;
172 mlog_errno(ret); 171 mlog_errno(ret);
@@ -196,7 +195,7 @@ static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb,
196 /* TODO: This needs to actually orphan the inode in this 195 /* TODO: This needs to actually orphan the inode in this
197 * transaction. */ 196 * transaction. */
198 197
199 handle = ocfs2_start_trans(osb, NULL, OCFS2_INODE_UPDATE_CREDITS); 198 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
200 if (IS_ERR(handle)) { 199 if (IS_ERR(handle)) {
201 status = PTR_ERR(handle); 200 status = PTR_ERR(handle);
202 mlog_errno(status); 201 mlog_errno(status);
@@ -496,7 +495,7 @@ restart_all:
496 drop_alloc_sem = 1; 495 drop_alloc_sem = 1;
497 496
498 credits = ocfs2_calc_extend_credits(osb->sb, fe, clusters_to_add); 497 credits = ocfs2_calc_extend_credits(osb->sb, fe, clusters_to_add);
499 handle = ocfs2_start_trans(osb, NULL, credits); 498 handle = ocfs2_start_trans(osb, credits);
500 if (IS_ERR(handle)) { 499 if (IS_ERR(handle)) {
501 status = PTR_ERR(handle); 500 status = PTR_ERR(handle);
502 handle = NULL; 501 handle = NULL;
@@ -832,7 +831,7 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)
832 } 831 }
833 } 832 }
834 833
835 handle = ocfs2_start_trans(osb, NULL, OCFS2_INODE_UPDATE_CREDITS); 834 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
836 if (IS_ERR(handle)) { 835 if (IS_ERR(handle)) {
837 status = PTR_ERR(handle); 836 status = PTR_ERR(handle);
838 mlog_errno(status); 837 mlog_errno(status);
@@ -905,7 +904,7 @@ static int ocfs2_write_remove_suid(struct inode *inode)
905 mlog_entry("(Inode %llu, mode 0%o)\n", 904 mlog_entry("(Inode %llu, mode 0%o)\n",
906 (unsigned long long)oi->ip_blkno, inode->i_mode); 905 (unsigned long long)oi->ip_blkno, inode->i_mode);
907 906
908 handle = ocfs2_start_trans(osb, NULL, OCFS2_INODE_UPDATE_CREDITS); 907 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
909 if (handle == NULL) { 908 if (handle == NULL) {
910 ret = -ENOMEM; 909 ret = -ENOMEM;
911 mlog_errno(ret); 910 mlog_errno(ret);