diff options
Diffstat (limited to '')
-rw-r--r-- | fs/ext4/inode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 34cee87a0..95139c992 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1310,6 +1310,13 @@ retry_grab: page = grab_cache_page_write_begin(mapping, index, flags); if (!page) return -ENOMEM; + /* + * The same as page allocation, we prealloc buffer heads before + * starting the handle. + */ + if (!page_has_buffers(page)) + create_empty_buffers(page, inode->i_sb->s_blocksize, 0); + unlock_page(page); retry_journal: |