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.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index ffa34b861bd..b33d67bba2f 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -2363,6 +2363,13 @@ static int reiserfs_write_full_page(struct page *page,
2363 int bh_per_page = PAGE_CACHE_SIZE / s->s_blocksize; 2363 int bh_per_page = PAGE_CACHE_SIZE / s->s_blocksize;
2364 th.t_trans_id = 0; 2364 th.t_trans_id = 0;
2365 2365
2366 /* no logging allowed when nonblocking or from PF_MEMALLOC */
2367 if (checked && (current->flags & PF_MEMALLOC)) {
2368 redirty_page_for_writepage(wbc, page);
2369 unlock_page(page);
2370 return 0;
2371 }
2372
2366 /* The page dirty bit is cleared before writepage is called, which 2373 /* The page dirty bit is cleared before writepage is called, which
2367 * means we have to tell create_empty_buffers to make dirty buffers 2374 * means we have to tell create_empty_buffers to make dirty buffers
2368 * The page really should be up to date at this point, so tossing 2375 * The page really should be up to date at this point, so tossing
@@ -2743,6 +2750,7 @@ static int invalidatepage_can_drop(struct inode *inode, struct buffer_head *bh)
2743 int ret = 1; 2750 int ret = 1;
2744 struct reiserfs_journal *j = SB_JOURNAL(inode->i_sb); 2751 struct reiserfs_journal *j = SB_JOURNAL(inode->i_sb);
2745 2752
2753 lock_buffer(bh);
2746 spin_lock(&j->j_dirty_buffers_lock); 2754 spin_lock(&j->j_dirty_buffers_lock);
2747 if (!buffer_mapped(bh)) { 2755 if (!buffer_mapped(bh)) {
2748 goto free_jh; 2756 goto free_jh;
@@ -2758,7 +2766,7 @@ static int invalidatepage_can_drop(struct inode *inode, struct buffer_head *bh)
2758 if (buffer_journaled(bh) || buffer_journal_dirty(bh)) { 2766 if (buffer_journaled(bh) || buffer_journal_dirty(bh)) {
2759 ret = 0; 2767 ret = 0;
2760 } 2768 }
2761 } else if (buffer_dirty(bh) || buffer_locked(bh)) { 2769 } else if (buffer_dirty(bh)) {
2762 struct reiserfs_journal_list *jl; 2770 struct reiserfs_journal_list *jl;
2763 struct reiserfs_jh *jh = bh->b_private; 2771 struct reiserfs_jh *jh = bh->b_private;
2764 2772
@@ -2784,6 +2792,7 @@ static int invalidatepage_can_drop(struct inode *inode, struct buffer_head *bh)
2784 reiserfs_free_jh(bh); 2792 reiserfs_free_jh(bh);
2785 } 2793 }
2786 spin_unlock(&j->j_dirty_buffers_lock); 2794 spin_unlock(&j->j_dirty_buffers_lock);
2795 unlock_buffer(bh);
2787 return ret; 2796 return ret;
2788} 2797}
2789 2798