summaryrefslogtreecommitdiffstats
path: root/fs/stat.c
diff options
context:
space:
mode:
authorGuo Ren <guoren@linux.alibaba.com>2022-04-05 09:12:59 +0200
committerPalmer Dabbelt <palmer@rivosinc.com>2022-04-26 22:35:45 +0200
commitf18ed30db299458f809aec55bf1800dbeebeb953 (patch)
tree0288b5a1de164a136a9219d3f2853720fa7286cf /fs/stat.c
parentarch: Add SYSVIPC_COMPAT for all architectures (diff)
downloadlinux-f18ed30db299458f809aec55bf1800dbeebeb953.tar.xz
linux-f18ed30db299458f809aec55bf1800dbeebeb953.zip
fs: stat: compat: Add __ARCH_WANT_COMPAT_STAT
RISC-V doesn't neeed compat_stat, so using __ARCH_WANT_COMPAT_STAT to exclude unnecessary SYSCALL functions. Signed-off-by: Guo Ren <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@kernel.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Helge Deller <deller@gmx.de> # parisc Link: https://lore.kernel.org/r/20220405071314.3225832-6-guoren@kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'fs/stat.c')
-rw-r--r--fs/stat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/stat.c b/fs/stat.c
index 7f734be0e57e..5d8f723c1e0b 100644
--- a/fs/stat.c
+++ b/fs/stat.c
@@ -660,7 +660,7 @@ SYSCALL_DEFINE5(statx,
return ret;
}
-#ifdef CONFIG_COMPAT
+#if defined(CONFIG_COMPAT) && defined(__ARCH_WANT_COMPAT_STAT)
static int cp_compat_stat(struct kstat *stat, struct compat_stat __user *ubuf)
{
struct compat_stat tmp;