aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/inode.c')
-rw-r--r--fs/reiserfs/inode.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index 1a8a1bf2154d..d76ee6c4f9b8 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -2639,6 +2639,12 @@ static int reiserfs_commit_write(struct file *f, struct page *page,
2639 } 2639 }
2640 reiserfs_update_inode_transaction(inode); 2640 reiserfs_update_inode_transaction(inode);
2641 inode->i_size = pos; 2641 inode->i_size = pos;
2642 /*
2643 * this will just nest into our transaction. It's important
2644 * to use mark_inode_dirty so the inode gets pushed around on the
2645 * dirty lists, and so that O_SYNC works as expected
2646 */
2647 mark_inode_dirty(inode);
2642 reiserfs_update_sd(&myth, inode); 2648 reiserfs_update_sd(&myth, inode);
2643 update_sd = 1; 2649 update_sd = 1;
2644 ret = journal_end(&myth, inode->i_sb, 1); 2650 ret = journal_end(&myth, inode->i_sb, 1);
@@ -2649,21 +2655,13 @@ static int reiserfs_commit_write(struct file *f, struct page *page,
2649 if (th) { 2655 if (th) {
2650 reiserfs_write_lock(inode->i_sb); 2656 reiserfs_write_lock(inode->i_sb);
2651 if (!update_sd) 2657 if (!update_sd)
2652 reiserfs_update_sd(th, inode); 2658 mark_inode_dirty(inode);
2653 ret = reiserfs_end_persistent_transaction(th); 2659 ret = reiserfs_end_persistent_transaction(th);
2654 reiserfs_write_unlock(inode->i_sb); 2660 reiserfs_write_unlock(inode->i_sb);
2655 if (ret) 2661 if (ret)
2656 goto out; 2662 goto out;
2657 } 2663 }
2658 2664
2659 /* we test for O_SYNC here so we can commit the transaction
2660 ** for any packed tails the file might have had
2661 */
2662 if (f && (f->f_flags & O_SYNC)) {
2663 reiserfs_write_lock(inode->i_sb);
2664 ret = reiserfs_commit_for_inode(inode);
2665 reiserfs_write_unlock(inode->i_sb);
2666 }
2667 out: 2665 out:
2668 return ret; 2666 return ret;
2669 2667