linux/fs/ext3
Jan Kara 9eaaa2d575 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>
2009-07-15 21:28:07 +02:00
..
acl.c helpers for acl caching + switch to those 2009-06-24 08:17:07 -04:00
acl.h switch ext3 to inode->i_acl 2009-06-24 08:17:04 -04:00
balloc.c ext3: remove ->write_super and stop maintaining ->s_dirt 2009-06-11 21:36:05 -04:00
bitmap.c
dir.c ext3: remove the BKL in ext3/ioctl.c 2009-04-02 19:04:52 -07:00
ext3_jbd.c ext3: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:45 -07:00
file.c Merge branch 'ext3-latency-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 2009-04-03 11:10:33 -07:00
fsync.c ext3: fdatasync should skip metadata writeout when overwriting 2008-04-28 08:58:43 -07:00
hash.c ext3: Add support for non-native signed/unsigned htree hash algorithms 2008-10-28 13:21:55 -04:00
ialloc.c ext3: remove ->write_super and stop maintaining ->s_dirt 2009-06-11 21:36:05 -04:00
inode.c ext3: Fix truncation of symlinks after failed write 2009-07-15 21:28:07 +02:00
ioctl.c ext3: remove the BKL in ext3/ioctl.c 2009-04-02 19:04:52 -07:00
Kconfig ext3: make default data ordering mode configurable 2009-04-06 17:16:47 -07:00
Makefile
namei.c Merge branch 'ext3-latency-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 2009-04-03 11:10:33 -07:00
namei.h
resize.c block: rename CONFIG_LBD to CONFIG_LBDAF 2009-06-19 08:08:50 +02:00
super.c switch ext3 to inode->i_acl 2009-06-24 08:17:04 -04:00
symlink.c
xattr_security.c ext3: remove double definitions of xattr macros 2008-07-25 10:53:32 -07:00
xattr_trusted.c ext3: remove double definitions of xattr macros 2008-07-25 10:53:32 -07:00
xattr_user.c ext3: remove double definitions of xattr macros 2008-07-25 10:53:32 -07:00
xattr.c ext3: remove ->write_super and stop maintaining ->s_dirt 2009-06-11 21:36:05 -04:00
xattr.h make ext3_xattr_list() static 2008-04-28 08:58:44 -07:00