inode.c (abadc1fcd72e887a8f875dabe4a07aa8c28ac8af) | inode.c (5297199a8bca12b8b96afcbf2341605efb6005de) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2007 Oracle. All rights reserved. 4 */ 5 6#include <crypto/hash.h> 7#include <linux/kernel.h> 8#include <linux/bio.h> --- 31 unchanged lines hidden (view full) --- 40#include "print-tree.h" 41#include "ordered-data.h" 42#include "xattr.h" 43#include "tree-log.h" 44#include "volumes.h" 45#include "compression.h" 46#include "locking.h" 47#include "free-space-cache.h" | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2007 Oracle. All rights reserved. 4 */ 5 6#include <crypto/hash.h> 7#include <linux/kernel.h> 8#include <linux/bio.h> --- 31 unchanged lines hidden (view full) --- 40#include "print-tree.h" 41#include "ordered-data.h" 42#include "xattr.h" 43#include "tree-log.h" 44#include "volumes.h" 45#include "compression.h" 46#include "locking.h" 47#include "free-space-cache.h" |
48#include "inode-map.h" | |
49#include "props.h" 50#include "qgroup.h" 51#include "delalloc-space.h" 52#include "block-group.h" 53#include "space-info.h" 54 55struct btrfs_iget_args { 56 u64 ino; --- 4152 unchanged lines hidden (view full) --- 4209 root_flags = btrfs_root_flags(&dest->root_item); 4210 btrfs_set_root_flags(&dest->root_item, 4211 root_flags & ~BTRFS_ROOT_SUBVOL_DEAD); 4212 spin_unlock(&dest->root_item_lock); 4213 } else { 4214 d_invalidate(dentry); 4215 btrfs_prune_dentries(dest); 4216 ASSERT(dest->send_in_progress == 0); | 48#include "props.h" 49#include "qgroup.h" 50#include "delalloc-space.h" 51#include "block-group.h" 52#include "space-info.h" 53 54struct btrfs_iget_args { 55 u64 ino; --- 4152 unchanged lines hidden (view full) --- 4208 root_flags = btrfs_root_flags(&dest->root_item); 4209 btrfs_set_root_flags(&dest->root_item, 4210 root_flags & ~BTRFS_ROOT_SUBVOL_DEAD); 4211 spin_unlock(&dest->root_item_lock); 4212 } else { 4213 d_invalidate(dentry); 4214 btrfs_prune_dentries(dest); 4215 ASSERT(dest->send_in_progress == 0); |
4217 4218 /* the last ref */ 4219 if (dest->ino_cache_inode) { 4220 iput(dest->ino_cache_inode); 4221 dest->ino_cache_inode = NULL; 4222 } | |
4223 } 4224 4225 return ret; 4226} 4227 4228static int btrfs_rmdir(struct inode *dir, struct dentry *dentry) 4229{ 4230 struct inode *inode = d_inode(dentry); --- 1059 unchanged lines hidden (view full) --- 5290 trans = evict_refill_and_join(root, rsv); 5291 if (!IS_ERR(trans)) { 5292 trans->block_rsv = rsv; 5293 btrfs_orphan_del(trans, BTRFS_I(inode)); 5294 trans->block_rsv = &fs_info->trans_block_rsv; 5295 btrfs_end_transaction(trans); 5296 } 5297 | 4216 } 4217 4218 return ret; 4219} 4220 4221static int btrfs_rmdir(struct inode *dir, struct dentry *dentry) 4222{ 4223 struct inode *inode = d_inode(dentry); --- 1059 unchanged lines hidden (view full) --- 5283 trans = evict_refill_and_join(root, rsv); 5284 if (!IS_ERR(trans)) { 5285 trans->block_rsv = rsv; 5286 btrfs_orphan_del(trans, BTRFS_I(inode)); 5287 trans->block_rsv = &fs_info->trans_block_rsv; 5288 btrfs_end_transaction(trans); 5289 } 5290 |
5298 if (!(root == fs_info->tree_root || 5299 root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID)) 5300 btrfs_return_ino(root, btrfs_ino(BTRFS_I(inode))); 5301 | |
5302free_rsv: 5303 btrfs_free_block_rsv(fs_info, rsv); 5304no_delete: 5305 /* 5306 * If we didn't successfully delete, the orphan item will still be in 5307 * the tree and we'll retry on the next mount. Again, we might also want 5308 * to retry these periodically in the future. 5309 */ --- 5075 unchanged lines hidden --- | 5291free_rsv: 5292 btrfs_free_block_rsv(fs_info, rsv); 5293no_delete: 5294 /* 5295 * If we didn't successfully delete, the orphan item will still be in 5296 * the tree and we'll retry on the next mount. Again, we might also want 5297 * to retry these periodically in the future. 5298 */ --- 5075 unchanged lines hidden --- |