Evgeniy Dushistov 10e5dce07e [PATCH] ufs: truncate should allocate block for last byte
This patch fixes buggy behaviour of UFS
in such kind of scenario:
open(, O_TRUNC...)
ftruncate(, 1024)
ftruncate(, 0)

Such a scenario causes ufs_panic and remount read-only.  This happen
because of according to specification UFS should always allocate block for
last byte, and many parts of our implementation rely on this, but
`ufs_truncate' doesn't care about this.

To make possible return error code and to know about old size, this patch
removes `truncate' from ufs inode_operations and uses `setattr' method to
call ufs_truncate.

Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-01 09:56:03 -07:00
..
2006-06-29 19:55:27 -04:00
2006-06-29 16:58:06 -07:00
2006-06-29 16:58:06 -07:00
2006-06-29 16:58:06 -07:00
2006-06-29 16:58:06 -07:00
2006-06-29 16:58:06 -07:00
2006-06-29 16:58:06 -07:00
2006-06-29 16:58:06 -07:00
2006-06-29 16:58:06 -07:00
2006-06-30 18:20:44 +02:00
2006-06-29 16:58:06 -07:00
2006-06-29 16:58:06 -07:00
2006-06-29 16:58:06 -07:00
2006-06-30 14:12:10 -07:00
2006-06-28 19:31:09 +02:00