// SPDX-License-Identifier: GPL-2.0/* * Copyright (c) 2000-2005 Silicon Graphics, Inc. * All Rights Reserved. */#include"xfs.h"#include"xfs_fs.h"#include"xfs_shared.h"#include"xfs_format.h"#include"xfs_log_format.h"#include"xfs_trans_resv.h"#include"xfs_bit.h"#include"xfs_sb.h"#include"xfs_mount.h"#include"xfs_defer.h"#include"xfs_da_format.h"#include"xfs_da_btree.h"#include"xfs_inode.h"#include"xfs_dir2.h"#include"xfs_ialloc.h"#include"xfs_alloc.h"#include"xfs_rtalloc.h"#include"xfs_bmap.h"#include"xfs_trans.h"#include"xfs_trans_priv.h"#include"xfs_log.h"#include"xfs_error.h"#include"xfs_quota.h"#include"xfs_fsops.h"#include"xfs_trace.h"#include"xfs_icache.h"#include"xfs_sysfs.h"#include"xfs_rmap_btree.h"#include"xfs_refcount_btree.h"#include"xfs_reflink.h"#include"xfs_extent_busy.h"staticDEFINE_MUTEX(xfs_uuid_table_mutex);staticintxfs_uuid_table_size;staticuuid_t*xfs_uuid_table;voidxfs_uuid_table_free(void){if(xfs_uuid_table_size==0)return;kmem_free(xfs_uuid_table);xfs_uuid_table=NULL;xfs_uuid_table_size=0;}/* * See if the UUID is unique among mounted XFS filesystems. * Mount fails if UUID is nil or a FS with the same UUID is already mounted. */STATICintxfs_uuid_mount(structxfs_mount*mp){uuid_t*uuid=&mp->m_sb.sb_uuid;inthole,i;/* Publish UUID in struct super_block */uuid_copy(&mp->m_super