diff options
author | Lukas Czerner <lczerner@redhat.com> | 2022-07-04 16:27:21 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2022-08-03 05:56:17 +0200 |
commit | b8a04fe77ef1360fbf73c80fddbdfeaa9407ed1b (patch) | |
tree | 504a79dafe61d776611aa4ea5715b2d18337b40f /fs/mbcache.c | |
parent | ext4: check if directory block is within i_size (diff) | |
download | linux-b8a04fe77ef1360fbf73c80fddbdfeaa9407ed1b.tar.xz linux-b8a04fe77ef1360fbf73c80fddbdfeaa9407ed1b.zip |
ext4: make sure ext4_append() always allocates new block
ext4_append() must always allocate a new block, otherwise we run the
risk of overwriting existing directory block corrupting the directory
tree in the process resulting in all manner of problems later on.
Add a sanity check to see if the logical block is already allocated and
error out if it is.
Cc: stable@kernel.org
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Link: https://lore.kernel.org/r/20220704142721.157985-2-lczerner@redhat.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/mbcache.c')
0 files changed, 0 insertions, 0 deletions