Merge tag 'xfs-6.10-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[linux-2.6-block.git] / fs / squashfs / xattr.h
CommitLineData
68252eb5 1/* SPDX-License-Identifier: GPL-2.0-or-later */
01e5b4e4
PL
2/*
3 * Squashfs - a compressed read only filesystem for Linux
4 *
5 * Copyright (c) 2010
d7f2ff67 6 * Phillip Lougher <phillip@squashfs.org.uk>
01e5b4e4 7 *
01e5b4e4
PL
8 * xattr.h
9 */
10
637d5c9a 11#ifdef CONFIG_SQUASHFS_XATTR
01e5b4e4 12extern __le64 *squashfs_read_xattr_id_table(struct super_block *, u64,
f65c4bbb 13 u64 *, unsigned int *);
01e5b4e4 14extern int squashfs_xattr_lookup(struct super_block *, unsigned int, int *,
5f3b321d 15 unsigned int *, unsigned long long *);
01e5b4e4
PL
16#else
17static inline __le64 *squashfs_read_xattr_id_table(struct super_block *sb,
f65c4bbb 18 u64 start, u64 *xattr_table_start, unsigned int *xattr_ids)
01e5b4e4 19{
f37aa4c7
PL
20 struct squashfs_xattr_id_table *id_table;
21
22 id_table = squashfs_read_table(sb, start, sizeof(*id_table));
23 if (IS_ERR(id_table))
24 return (__le64 *) id_table;
25
26 *xattr_table_start = le64_to_cpu(id_table->xattr_table_start);
27 kfree(id_table);
28
01e5b4e4
PL
29 ERROR("Xattrs in filesystem, these will be ignored\n");
30 return ERR_PTR(-ENOTSUPP);
31}
32
33static inline int squashfs_xattr_lookup(struct super_block *sb,
5f3b321d 34 unsigned int index, int *count, unsigned int *size,
aa5b1894 35 unsigned long long *xattr)
01e5b4e4
PL
36{
37 return 0;
38}
39#define squashfs_listxattr NULL
01e5b4e4
PL
40#define squashfs_xattr_handlers NULL
41#endif