disk-io.c (3831bf0094abed51e71cbeca8b6edf8b88c2644b) | disk-io.c (b4e967be431cf37f56cd1993592943007d7ab03b) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2007 Oracle. All rights reserved. 4 */ 5 6#include <linux/fs.h> 7#include <linux/blkdev.h> 8#include <linux/radix-tree.h> --- 2205 unchanged lines hidden (view full) --- 2214 } 2215 2216 return 0; 2217} 2218 2219static int btrfs_init_csum_hash(struct btrfs_fs_info *fs_info, u16 csum_type) 2220{ 2221 struct crypto_shash *csum_shash; | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2007 Oracle. All rights reserved. 4 */ 5 6#include <linux/fs.h> 7#include <linux/blkdev.h> 8#include <linux/radix-tree.h> --- 2205 unchanged lines hidden (view full) --- 2214 } 2215 2216 return 0; 2217} 2218 2219static int btrfs_init_csum_hash(struct btrfs_fs_info *fs_info, u16 csum_type) 2220{ 2221 struct crypto_shash *csum_shash; |
2222 const char *csum_name = btrfs_super_csum_name(csum_type); | 2222 const char *csum_driver = btrfs_super_csum_driver(csum_type); |
2223 | 2223 |
2224 csum_shash = crypto_alloc_shash(csum_name, 0, 0); | 2224 csum_shash = crypto_alloc_shash(csum_driver, 0, 0); |
2225 2226 if (IS_ERR(csum_shash)) { 2227 btrfs_err(fs_info, "error allocating %s hash for checksum", | 2225 2226 if (IS_ERR(csum_shash)) { 2227 btrfs_err(fs_info, "error allocating %s hash for checksum", |
2228 csum_name); | 2228 csum_driver); |
2229 return PTR_ERR(csum_shash); 2230 } 2231 2232 fs_info->csum_shash = csum_shash; 2233 2234 return 0; 2235} 2236 --- 2344 unchanged lines hidden --- | 2229 return PTR_ERR(csum_shash); 2230 } 2231 2232 fs_info->csum_shash = csum_shash; 2233 2234 return 0; 2235} 2236 --- 2344 unchanged lines hidden --- |