]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
Btrfs: avoid orphan inode caused by log replay
authorYan Zheng <zheng.yan@oracle.com>
Mon, 5 Jan 2009 20:43:42 +0000 (15:43 -0500)
committerChris Mason <chris.mason@oracle.com>
Mon, 5 Jan 2009 20:43:42 +0000 (15:43 -0500)
commitec051c0f929afe5c42c24bb07abf577c616c208c
treea9b75cd422cf7dde92c9dbb8828feb062e2c35ec
parent2d69a0f88459fae35df3ddef4934a2dad67e2765
Btrfs: avoid orphan inode caused by log replay

drop_one_dir_item does not properly update inode's link count. It can be
reproduced by executing following commands:

#touch test
#sync
#rm -f test
#dd if=/dev/zero bs=4k count=1 of=test conv=fsync
#echo b > /proc/sysrq-trigger

This fixes it by adding an BTRFS_ORPHAN_ITEM_KEY for the inode

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
fs/btrfs/tree-log.c