Skip to content
Commit ec051c0f authored by Yan Zheng's avatar Yan Zheng Committed by Chris Mason
Browse files

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: default avatarYan Zheng <zheng.yan@oracle.com>
parent 2d69a0f8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment