Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42375
b: refs/heads/master
c: 6d8fc40
h: refs/heads/master
i:
  42373: f73c337
  42371: 5449a26
  42367: 3c5adf1
v: v3
  • Loading branch information
Mark Fasheh committed Dec 2, 2006
1 parent ea7047a commit 0c7f27e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 30a4f5e86bc7bc388ce808117e7722706f739602
refs/heads/master: 6d8fc40e63401be065b0aa98dfa4246deca04b8c
21 changes: 12 additions & 9 deletions trunk/fs/ocfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1603,19 +1603,12 @@ static int ocfs2_symlink(struct inode *dir,

credits = ocfs2_calc_symlink_credits(sb);

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

/* lock the parent directory */
status = ocfs2_meta_lock(dir, handle, &parent_fe_bh, 1);
status = ocfs2_meta_lock(dir, NULL, &parent_fe_bh, 1);
if (status < 0) {
if (status != -ENOENT)
mlog_errno(status);
goto bail;
return status;
}

dirfe = (struct ocfs2_dinode *) parent_fe_bh->b_data;
Expand All @@ -1638,6 +1631,13 @@ static int ocfs2_symlink(struct inode *dir,
goto bail;
}

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

status = ocfs2_reserve_new_inode(osb, handle, &inode_ac);
if (status < 0) {
if (status != -ENOSPC)
Expand Down Expand Up @@ -1734,6 +1734,9 @@ static int ocfs2_symlink(struct inode *dir,
bail:
if (handle)
ocfs2_commit_trans(handle);

ocfs2_meta_unlock(dir, 1);

if (new_fe_bh)
brelse(new_fe_bh);
if (parent_fe_bh)
Expand Down

0 comments on commit 0c7f27e

Please sign in to comment.