diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index e99306a8f47c..18a029362c1f 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -6688,6 +6688,14 @@ vm_fault_t ext4_page_mkwrite(struct vm_fault *vmf) if (err) goto out_ret; + folio_lock(folio); + if (!folio_test_uptodate(folio)) { + folio_unlock(folio); + ret = VM_FAULT_SIGBUS; + goto out; + } + folio_unlock(folio); + /* * On data journalling we skip straight to the transaction handle: * there's no delalloc; page truncated will be checked later; the