internal.h (2612e3bbc0386368a850140a6c9b990cd496a5ec) internal.h (ffa09b3bd02427ab631f0c1b64714ce6fc885f61)
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright (C) 2017-2018 HUAWEI, Inc.
4 * https://www.huawei.com/
5 * Copyright (C) 2021, Alibaba Cloud
6 */
7#ifndef __EROFS_INTERNAL_H
8#define __EROFS_INTERNAL_H

--- 505 unchanged lines hidden (view full) ---

514 if (lzma) {
515 erofs_err(sb, "lzma algorithm isn't enabled");
516 return -EINVAL;
517 }
518 return 0;
519}
520#endif /* !CONFIG_EROFS_FS_ZIP_LZMA */
521
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright (C) 2017-2018 HUAWEI, Inc.
4 * https://www.huawei.com/
5 * Copyright (C) 2021, Alibaba Cloud
6 */
7#ifndef __EROFS_INTERNAL_H
8#define __EROFS_INTERNAL_H

--- 505 unchanged lines hidden (view full) ---

514 if (lzma) {
515 erofs_err(sb, "lzma algorithm isn't enabled");
516 return -EINVAL;
517 }
518 return 0;
519}
520#endif /* !CONFIG_EROFS_FS_ZIP_LZMA */
521
522#ifdef CONFIG_EROFS_FS_ZIP_DEFLATE
523int __init z_erofs_deflate_init(void);
524void z_erofs_deflate_exit(void);
525int z_erofs_load_deflate_config(struct super_block *sb,
526 struct erofs_super_block *dsb,
527 struct z_erofs_deflate_cfgs *dfl, int size);
528#else
529static inline int z_erofs_deflate_init(void) { return 0; }
530static inline int z_erofs_deflate_exit(void) { return 0; }
531static inline int z_erofs_load_deflate_config(struct super_block *sb,
532 struct erofs_super_block *dsb,
533 struct z_erofs_deflate_cfgs *dfl, int size) {
534 if (dfl) {
535 erofs_err(sb, "deflate algorithm isn't enabled");
536 return -EINVAL;
537 }
538 return 0;
539}
540#endif /* !CONFIG_EROFS_FS_ZIP_DEFLATE */
541
522#ifdef CONFIG_EROFS_FS_ONDEMAND
523int erofs_fscache_register_fs(struct super_block *sb);
524void erofs_fscache_unregister_fs(struct super_block *sb);
525
526struct erofs_fscache *erofs_fscache_register_cookie(struct super_block *sb,
527 char *name, unsigned int flags);
528void erofs_fscache_unregister_cookie(struct erofs_fscache *fscache);
529#else

--- 21 unchanged lines hidden ---
542#ifdef CONFIG_EROFS_FS_ONDEMAND
543int erofs_fscache_register_fs(struct super_block *sb);
544void erofs_fscache_unregister_fs(struct super_block *sb);
545
546struct erofs_fscache *erofs_fscache_register_cookie(struct super_block *sb,
547 char *name, unsigned int flags);
548void erofs_fscache_unregister_cookie(struct erofs_fscache *fscache);
549#else

--- 21 unchanged lines hidden ---