aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/journal.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/journal.c')
-rw-r--r--fs/reiserfs/journal.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 2d04efb22eea..bc8fe963b3cc 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -877,6 +877,19 @@ static int write_ordered_buffers(spinlock_t * lock,
877 if (!buffer_uptodate(bh)) { 877 if (!buffer_uptodate(bh)) {
878 ret = -EIO; 878 ret = -EIO;
879 } 879 }
880 /* ugly interaction with invalidatepage here.
881 * reiserfs_invalidate_page will pin any buffer that has a valid
882 * journal head from an older transaction. If someone else sets
883 * our buffer dirty after we write it in the first loop, and
884 * then someone truncates the page away, nobody will ever write
885 * the buffer. We're safe if we write the page one last time
886 * after freeing the journal header.
887 */
888 if (buffer_dirty(bh) && unlikely(bh->b_page->mapping == NULL)) {
889 spin_unlock(lock);
890 ll_rw_block(WRITE, 1, &bh);
891 spin_lock(lock);
892 }
880 put_bh(bh); 893 put_bh(bh);
881 cond_resched_lock(lock); 894 cond_resched_lock(lock);
882 } 895 }