Skip to content

Commit

Permalink
ocfs2: Don't allocate handle early in ocfs2_rename()
Browse files Browse the repository at this point in the history
It isn't used until ocfs2_start_trans() anyway.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
  • Loading branch information
Mark Fasheh committed Dec 2, 2006
1 parent da5cbf2 commit 85b9e78
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions fs/ocfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1114,13 +1114,6 @@ static int ocfs2_rename(struct inode *old_dir,
rename_lock = 1;
}

handle = ocfs2_alloc_handle(osb);
if (handle == NULL) {
status = -ENOMEM;
mlog_errno(status);
goto bail;
}

/* if old and new are the same, this'll just do one lock. */
status = ocfs2_double_lock(osb, &old_dir_bh, old_dir,
&new_dir_bh, new_dir);
Expand Down Expand Up @@ -1291,7 +1284,7 @@ static int ocfs2_rename(struct inode *old_dir,
}
}

handle = ocfs2_start_trans(osb, handle, OCFS2_RENAME_CREDITS);
handle = ocfs2_start_trans(osb, NULL, OCFS2_RENAME_CREDITS);
if (IS_ERR(handle)) {
status = PTR_ERR(handle);
handle = NULL;
Expand Down

0 comments on commit 85b9e78

Please sign in to comment.