diff options
author | Jan Kara <jack@suse.cz> | 2009-07-13 20:26:52 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2009-07-15 21:28:07 +0200 |
commit | 9eaaa2d5759837402ec5eee13b2a97921808c3eb (patch) | |
tree | c1ba576d1175a91e7fb443a7d87a76c2380ce9cf /fs/btrfs | |
parent | 7447a668a3860b66b3c9db86fdea91e355ba59ac (diff) |
ext3: Fix truncation of symlinks after failed write
Contents of long symlinks is written via standard write methods. So when the
write fails, we add inode to orphan list. But symlinks don't have .truncate
method defined so nobody properly removes them from the orphan list (both on
disk and in memory).
Fix this by calling ext3_truncate() directly instead of calling vmtruncate()
(which is saner anyway since we don't need anything vmtruncate() does except
from calling .truncate in these paths). We also add inode to orphan list only
if ext3_can_truncate() is true (currently, it can be false for symlinks when
there are no blocks allocated) - otherwise orphan list processing will complain
and ext3_truncate() will not remove inode from on-disk orphan list.
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/btrfs')
0 files changed, 0 insertions, 0 deletions