]> git.baikalelectronics.ru Git - kernel.git/commit
ext3: make sure inode is deleted from orphan list after truncate
authorJan Kara <jack@suse.cz>
Wed, 17 Jun 2009 23:26:24 +0000 (16:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 18 Jun 2009 20:03:45 +0000 (13:03 -0700)
commit8efd1cadd1f2fe062e79309ccb08886b6a426f2c
tree64d42f459e5086768e57d8e8e9bec8304b17c150
parent8fa872ff577a3efa1e3a10151434e25445d374a8
ext3: make sure inode is deleted from orphan list after truncate

As Ted pointed out, it can happen that ext3_truncate() returns without
removing inode from orphan list.  This way we could in some rare cases
(like when we get ENOMEM from an allocation in ext3_truncate called
because of failed ext3_write_begin) leave the inode on orphan list and
that triggers assertion failure on umount.

So make ext3_truncate() always remove inode from in-memory orphan list.

Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ext3/inode.c