Commit 3c3a8583 authored by Baokun Li's avatar Baokun Li
Browse files

Revert "ext4: drop read-only check in ext4_write_inode()"

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBEQJ3



--------------------------------

This reverts commit f1128084.

We are about to revert 95257987 ("ext4: drop EXT4_MF_FS_ABORTED flag"),
therefore the changes to the sb_rdonly check are being reverted here.

Fixes: f1128084 ("ext4: drop read-only check in ext4_write_inode()")
Signed-off-by: default avatarBaokun Li <libaokun1@huawei.com>
parent 24fe7799
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5809,7 +5809,8 @@ int ext4_write_inode(struct inode *inode, struct writeback_control *wbc)
{
	int err;

	if (WARN_ON_ONCE(current->flags & PF_MEMALLOC))
	if (WARN_ON_ONCE(current->flags & PF_MEMALLOC) ||
	    sb_rdonly(inode->i_sb))
		return 0;

	if (unlikely(ext4_forced_shutdown(inode->i_sb)))