@@ -5,7 +5,6 @@ config XFS_FS
select EXPORTFS
select LIBCRC32C
select FS_IOMAP
- select CRYPTO_SHA512
help
XFS is a high performance journaling filesystem which originated
on the SGI IRIX platform. It is completely multi-threaded, can
@@ -62,7 +62,6 @@ typedef __u32 xfs_nlink_t;
#include <linux/rhashtable.h>
#include <linux/xattr.h>
#include <linux/mnt_idmapping.h>
-#include <crypto/hash.h>
#include <asm/page.h>
#include <asm/div64.h>
@@ -983,19 +983,6 @@ xfs_mountfs(
goto out_agresv;
}
- if (xfs_has_parent(mp)) {
- struct crypto_shash *tfm;
-
- tfm = crypto_alloc_shash("sha512", 0, 0);
- if (IS_ERR(tfm)) {
- error = PTR_ERR(tfm);
- goto out_agresv;
- }
- xfs_info(mp, "parent pointer hash %s",
- crypto_shash_driver_name(tfm));
- mp->m_sha512 = tfm;
- }
-
return 0;
out_agresv:
@@ -244,9 +244,6 @@ typedef struct xfs_mount {
#endif
/* Hook to feed file directory updates to an active online repair. */
struct xfs_hooks m_dirent_update_hooks;
-
- /* sha512 engine, if needed */
- struct crypto_shash *m_sha512;
} xfs_mount_t;
#define M_IGEO(mp) (&(mp)->m_ino_geo)
deleted file mode 100644
@@ -1,42 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * Copyright (C) 2023 Oracle. All Rights Reserved.
- * Author: Darrick J. Wong <djwong@kernel.org>
- */
-#ifndef __XFS_SHA512_H__
-#define __XFS_SHA512_H__
-
-struct sha512_state {
- union {
- struct shash_desc desc;
- char __desc[sizeof(struct shash_desc) + HASH_MAX_DESCSIZE];
- };
-};
-
-#define SHA512_DESC_ON_STACK(mp, name) \
- struct sha512_state name = { .desc.tfm = (mp)->m_sha512 }
-
-#define SHA512_DIGEST_SIZE 64
-
-static inline int sha512_init(struct sha512_state *md)
-{
- return crypto_shash_init(&md->desc);
-}
-
-static inline int sha512_done(struct sha512_state *md, unsigned char *out)
-{
- return crypto_shash_final(&md->desc, out);
-}
-
-static inline int sha512_process(struct sha512_state *md,
- const unsigned char *in, unsigned long inlen)
-{
- return crypto_shash_update(&md->desc, in, inlen);
-}
-
-static inline void sha512_erase(struct sha512_state *md)
-{
- memset(md, 0, sizeof(*md));
-}
-
-#endif /* __XFS_SHA512_H__ */
@@ -738,8 +738,6 @@ xfs_mount_free(
{
kfree(mp->m_rtname);
kfree(mp->m_logname);
- if (mp->m_sha512)
- crypto_free_shash(mp->m_sha512);
kmem_free(mp);
}
@@ -1963,7 +1961,6 @@ static int xfs_init_fs_context(
if (fc->sb_flags & SB_SYNCHRONOUS)
mp->m_features |= XFS_FEAT_WSYNC;
- mp->m_sha512 = NULL;
fc->s_fs_info = mp;
fc->ops = &xfs_context_ops;