udf: Protect truncate and file type conversion with invalidate_lock
authorJan Kara <jack@suse.cz>
Thu, 19 Jan 2023 11:46:09 +0000 (12:46 +0100)
committerJan Kara <jack@suse.cz>
Thu, 26 Jan 2023 15:46:35 +0000 (16:46 +0100)
commitb9a861fd527ab123e76effb492b4eb7e8115d4ca
treef51dab17dc5495d57f675b37a7dbd6a131d2daf4
parent96eeaaaea592079fcbf0b18a2b6f99165b32c942
udf: Protect truncate and file type conversion with invalidate_lock

Protect truncate and file type conversion in udf_file_write_iter() with
invalidate lock. That will allow us to serialize these paths with page
faults so that the page fault can determine the file type in a racefree
way.

Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/file.c
fs/udf/inode.c