提交 85b9e783 编写于 作者: M Mark Fasheh

ocfs2: Don't allocate handle early in ocfs2_rename()

It isn't used until ocfs2_start_trans() anyway.
Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
上级 da5cbf2f
......@@ -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);
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册