Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 229083
b: refs/heads/master
c: ad1857a
h: refs/heads/master
i:
  229081: a1706d6
  229079: c4f04c4
v: v3
  • Loading branch information
Namhyung Kim authored and Jan Kara committed Jan 6, 2011
1 parent 39b49c1 commit 7796800
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 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: 5026e90b86684bc878e4db0a8cd043fed769719c
refs/heads/master: ad1857a0e0cb29313efae3bb69c913b2c3c833a1
19 changes: 15 additions & 4 deletions trunk/fs/ext3/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2362,7 +2362,9 @@ static int ext3_rename (struct inode * old_dir, struct dentry *old_dentry,
goto end_rename;
} else {
BUFFER_TRACE(new_bh, "get write access");
ext3_journal_get_write_access(handle, new_bh);
retval = ext3_journal_get_write_access(handle, new_bh);
if (retval)
goto journal_error;
new_de->inode = cpu_to_le32(old_inode->i_ino);
if (EXT3_HAS_INCOMPAT_FEATURE(new_dir->i_sb,
EXT3_FEATURE_INCOMPAT_FILETYPE))
Expand All @@ -2371,7 +2373,9 @@ static int ext3_rename (struct inode * old_dir, struct dentry *old_dentry,
new_dir->i_ctime = new_dir->i_mtime = CURRENT_TIME_SEC;
ext3_mark_inode_dirty(handle, new_dir);
BUFFER_TRACE(new_bh, "call ext3_journal_dirty_metadata");
ext3_journal_dirty_metadata(handle, new_bh);
retval = ext3_journal_dirty_metadata(handle, new_bh);
if (retval)
goto journal_error;
brelse(new_bh);
new_bh = NULL;
}
Expand Down Expand Up @@ -2420,10 +2424,17 @@ static int ext3_rename (struct inode * old_dir, struct dentry *old_dentry,
ext3_update_dx_flag(old_dir);
if (dir_bh) {
BUFFER_TRACE(dir_bh, "get_write_access");
ext3_journal_get_write_access(handle, dir_bh);
retval = ext3_journal_get_write_access(handle, dir_bh);
if (retval)
goto journal_error;
PARENT_INO(dir_bh->b_data) = cpu_to_le32(new_dir->i_ino);
BUFFER_TRACE(dir_bh, "call ext3_journal_dirty_metadata");
ext3_journal_dirty_metadata(handle, dir_bh);
retval = ext3_journal_dirty_metadata(handle, dir_bh);
if (retval) {
journal_error:
ext3_std_error(new_dir->i_sb, retval);
goto end_rename;
}
drop_nlink(old_dir);
if (new_inode) {
drop_nlink(new_inode);
Expand Down

0 comments on commit 7796800

Please sign in to comment.