summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2023-06-16 18:50:55 +0200
committerTheodore Ts'o <tytso@mit.edu>2023-07-30 00:37:53 +0200
commitf1128084b40e520bea8bb32b3ff4d03745ab7e64 (patch)
tree559352f52dd070a639ec667c19f562085c949e3a /fs/ext4
parentext4: drop read-only check in ext4_init_inode_table() (diff)
downloadlinux-f1128084b40e520bea8bb32b3ff4d03745ab7e64.tar.xz
linux-f1128084b40e520bea8bb32b3ff4d03745ab7e64.zip
ext4: drop read-only check in ext4_write_inode()
We should not have dirty inodes on read-only filesystem. Also silently bailing without writing anything would be a problem when we enable quotas during remount while the filesystem is read-only. So drop the read-only check. Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20230616165109.21695-9-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 100c3ec6da6c..1b9003840bc1 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5129,8 +5129,7 @@ int ext4_write_inode(struct inode *inode, struct writeback_control *wbc)
{
int err;
- if (WARN_ON_ONCE(current->flags & PF_MEMALLOC) ||
- sb_rdonly(inode->i_sb))
+ if (WARN_ON_ONCE(current->flags & PF_MEMALLOC))
return 0;
if (unlikely(ext4_forced_shutdown(inode->i_sb)))