diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-05-01 11:00:04 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-05-01 11:00:04 -0700 |
commit | 06936aaf490ff55dd5787375a83d6e486bccc397 (patch) | |
tree | 62217c9fe3e60c53a291c4d27c76b15d0458cd90 /fs/ext4/inode.c | |
parent | 26c009dffca89b0f8fe7facc41d1ccf88a66825a (diff) | |
parent | d4fab7b28e2f5d74790d47a8d298da0abfb5132f (diff) |
Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 fixes from Ted Ts'o:
"Some ext4 regression and bug fixes"
* tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: clean up error handling in __ext4_fill_super()
ext4: reflect error codes from ext4_multi_mount_protect() to its callers
ext4: fix lost error code reporting in __ext4_fill_super()
ext4: fix unused iterator variable warnings
ext4: fix use-after-free read in ext4_find_extent for bigalloc + inline
ext4: fix i_disksize exceeding i_size problem in paritally written case
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index ffbbd9626bd8..0d5ba922e411 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -2982,6 +2982,9 @@ static int ext4_da_write_end(struct file *file, ext4_has_inline_data(inode)) return ext4_write_inline_data_end(inode, pos, len, copied, page); + if (unlikely(copied < len) && !PageUptodate(page)) + copied = 0; + start = pos & (PAGE_SIZE - 1); end = start + copied - 1; |