aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/namei.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-03 14:10:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-03 14:10:33 -0400
commit20bec8ab1458c24bed0d5492ee15d87807fc415a (patch)
treee5f910947dbe314b96a591e41e2cfb2d3322caad /fs/ext3/namei.c
parent18b34b9546dc192d978dda940673f40928d2e36e (diff)
parente7c8f5079ed9ec9e6eb1abe3defc5fb4ebfdf1cb (diff)
Merge branch 'ext3-latency-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'ext3-latency-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext3: Add replace-on-rename hueristics for data=writeback mode ext3: Add replace-on-truncate hueristics for data=writeback mode ext3: Use WRITE_SYNC for commits which are caused by fsync() block_write_full_page: Use synchronous writes for WBC_SYNC_ALL writebacks
Diffstat (limited to 'fs/ext3/namei.c')
-rw-r--r--fs/ext3/namei.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
index 6ddaa0a42b24..6ff7b9730234 100644
--- a/fs/ext3/namei.c
+++ b/fs/ext3/namei.c
@@ -2274,7 +2274,7 @@ static int ext3_rename (struct inode * old_dir, struct dentry *old_dentry,
2274 struct inode * old_inode, * new_inode; 2274 struct inode * old_inode, * new_inode;
2275 struct buffer_head * old_bh, * new_bh, * dir_bh; 2275 struct buffer_head * old_bh, * new_bh, * dir_bh;
2276 struct ext3_dir_entry_2 * old_de, * new_de; 2276 struct ext3_dir_entry_2 * old_de, * new_de;
2277 int retval; 2277 int retval, flush_file = 0;
2278 2278
2279 old_bh = new_bh = dir_bh = NULL; 2279 old_bh = new_bh = dir_bh = NULL;
2280 2280
@@ -2410,6 +2410,8 @@ static int ext3_rename (struct inode * old_dir, struct dentry *old_dentry,
2410 ext3_mark_inode_dirty(handle, new_inode); 2410 ext3_mark_inode_dirty(handle, new_inode);
2411 if (!new_inode->i_nlink) 2411 if (!new_inode->i_nlink)
2412 ext3_orphan_add(handle, new_inode); 2412 ext3_orphan_add(handle, new_inode);
2413 if (ext3_should_writeback_data(new_inode))
2414 flush_file = 1;
2413 } 2415 }
2414 retval = 0; 2416 retval = 0;
2415 2417
@@ -2418,6 +2420,8 @@ end_rename:
2418 brelse (old_bh); 2420 brelse (old_bh);
2419 brelse (new_bh); 2421 brelse (new_bh);
2420 ext3_journal_stop(handle); 2422 ext3_journal_stop(handle);
2423 if (retval == 0 && flush_file)
2424 filemap_flush(old_inode->i_mapping);
2421 return retval; 2425 return retval;
2422} 2426}
2423 2427