diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 8747eec3d0a3..7a2fb9789e5e 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -204,8 +204,10 @@ int f2fs_convert_inline_inode(struct inode *inode) struct page *ipage, *page; int err = 0; - if (!f2fs_has_inline_data(inode) || - f2fs_hw_is_readonly(sbi) || f2fs_readonly(sbi->sb)) + if (f2fs_hw_is_readonly(sbi) || f2fs_readonly(sbi->sb)) + return -EROFS; + + if (!f2fs_has_inline_data(inode)) return 0; err = f2fs_dquot_initialize(inode);