diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index cf26778085e08185a7c7c03e0fd6f7a34bc7c7e4..16925807a9ed5005945b62e5d14454b84b357ab7 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2538,6 +2538,8 @@ int btrfs_orphan_cleanup(struct btrfs_root *root) goto out; ret = btrfs_truncate(inode); + if (ret) + btrfs_orphan_del(NULL, inode); } else { nr_unlink++; }