]> git.baikalelectronics.ru Git - kernel.git/commit
udf: Fix possible corruption when close races with write
authorJan Kara <jack@suse.cz>
Thu, 6 Aug 2009 22:27:27 +0000 (00:27 +0200)
committerJan Kara <jack@suse.cz>
Mon, 14 Sep 2009 17:13:01 +0000 (19:13 +0200)
commit36540f66c54e71687c36e54236fa43c11f8b9d62
tree5edace261ca6d707456d1bde03c0bf719ac8a365
parent457b92c213de9254ab6dd95fdb6cc407a05e06c1
udf: Fix possible corruption when close races with write

When we close a file, we remove preallocated blocks from it. But this
truncation was not protected by i_mutex and thus it could have raced with a
write through a different fd and cause crashes or even filesystem corruption.

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