]> err.no Git - linux-2.6/commitdiff
ocfs2: Don't allocate handle early in ocfs2_rename()
authorMark Fasheh <mark.fasheh@oracle.com>
Sat, 7 Oct 2006 01:40:41 +0000 (18:40 -0700)
committerMark Fasheh <mark.fasheh@oracle.com>
Sat, 2 Dec 2006 02:27:53 +0000 (18:27 -0800)
It isn't used until ocfs2_start_trans() anyway.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
fs/ocfs2/namei.c

index ca012446d8e70f641ce48e2128e7068ca49af3ff..8d03ef446868615e3c210fb507d37b830c9e657c 100644 (file)
@@ -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;