aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext3/inode.c')
-rw-r--r--fs/ext3/inode.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index a8d3217c5cfe..fbf6599a1ce6 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -1623,7 +1623,13 @@ static int ext3_ordered_writepage(struct page *page,
1623 int err; 1623 int err;
1624 1624
1625 J_ASSERT(PageLocked(page)); 1625 J_ASSERT(PageLocked(page));
1626 WARN_ON_ONCE(IS_RDONLY(inode)); 1626 /*
1627 * We don't want to warn for emergency remount. The condition is
1628 * ordered to avoid dereferencing inode->i_sb in non-error case to
1629 * avoid slow-downs.
1630 */
1631 WARN_ON_ONCE(IS_RDONLY(inode) &&
1632 !(EXT3_SB(inode->i_sb)->s_mount_state & EXT3_ERROR_FS));
1627 1633
1628 /* 1634 /*
1629 * We give up here if we're reentered, because it might be for a 1635 * We give up here if we're reentered, because it might be for a
@@ -1698,7 +1704,13 @@ static int ext3_writeback_writepage(struct page *page,
1698 int err; 1704 int err;
1699 1705
1700 J_ASSERT(PageLocked(page)); 1706 J_ASSERT(PageLocked(page));
1701 WARN_ON_ONCE(IS_RDONLY(inode)); 1707 /*
1708 * We don't want to warn for emergency remount. The condition is
1709 * ordered to avoid dereferencing inode->i_sb in non-error case to
1710 * avoid slow-downs.
1711 */
1712 WARN_ON_ONCE(IS_RDONLY(inode) &&
1713 !(EXT3_SB(inode->i_sb)->s_mount_state & EXT3_ERROR_FS));
1702 1714
1703 if (ext3_journal_current_handle()) 1715 if (ext3_journal_current_handle())
1704 goto out_fail; 1716 goto out_fail;
@@ -1741,7 +1753,13 @@ static int ext3_journalled_writepage(struct page *page,
1741 int err; 1753 int err;
1742 1754
1743 J_ASSERT(PageLocked(page)); 1755 J_ASSERT(PageLocked(page));
1744 WARN_ON_ONCE(IS_RDONLY(inode)); 1756 /*
1757 * We don't want to warn for emergency remount. The condition is
1758 * ordered to avoid dereferencing inode->i_sb in non-error case to
1759 * avoid slow-downs.
1760 */
1761 WARN_ON_ONCE(IS_RDONLY(inode) &&
1762 !(EXT3_SB(inode->i_sb)->s_mount_state & EXT3_ERROR_FS));
1745 1763
1746 if (ext3_journal_current_handle()) 1764 if (ext3_journal_current_handle())
1747 goto no_write; 1765 goto no_write;