fs: do not call truncate for FILE_SIZE_STREAM sized files
open_and_lseek() increases the file size when the file is opened in
write mode and scrolled past the files end. This fails badly on /dev/mem
because loff_t which we use for the file size is signed variable, which
is used as an unsigned variable in /dev/mem. To catch this case do not
try to truncate FILE_SIZE_STREAM sized files.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 97e7c77 commit 20eea939a6fef5a02d55e83b997cd8c86607d83f
@Sascha Hauer Sascha Hauer authored on 4 Feb 2019
Showing 1 changed file
View
fs/fs.c