@@ -8434,17 +8434,17 @@ void btrfs_destroy_inode(struct inode *vfs_inode)
struct btrfs_root *root = inode->root;
bool freespace_inode;
- WARN_ON(!hlist_empty(&vfs_inode->i_dentry));
- WARN_ON(vfs_inode->i_data.nrpages);
- WARN_ON(inode->block_rsv.reserved);
- WARN_ON(inode->block_rsv.size);
- WARN_ON(inode->outstanding_extents);
+ WARN_ON_ONCE(!hlist_empty(&vfs_inode->i_dentry));
+ WARN_ON_ONCE(vfs_inode->i_data.nrpages);
+ WARN_ON_ONCE(inode->block_rsv.reserved);
+ WARN_ON_ONCE(inode->block_rsv.size);
+ WARN_ON_ONCE(inode->outstanding_extents);
if (!S_ISDIR(vfs_inode->i_mode)) {
- WARN_ON(inode->delalloc_bytes);
- WARN_ON(inode->new_delalloc_bytes);
+ WARN_ON_ONCE(inode->delalloc_bytes);
+ WARN_ON_ONCE(inode->new_delalloc_bytes);
}
- WARN_ON(inode->csum_bytes);
- WARN_ON(inode->defrag_bytes);
+ WARN_ON_ONCE(inode->csum_bytes);
+ WARN_ON_ONCE(inode->defrag_bytes);
/*
* This can happen where we create an inode, but somebody else also
When a condition in btrfs_destroy_inode is tends to triggers for many inodes during unmount. Switch to WARN_ON_ONCE to reduce the log spam. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/btrfs/inode.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)