aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/compat_linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/compat_linux.c')
-rw-r--r--arch/s390/kernel/compat_linux.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index cc20f0e3a7d3..cc058dc3bc8b 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -905,6 +905,26 @@ asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 __user * sta
905 return ret; 905 return ret;
906} 906}
907 907
908asmlinkage long sys32_fstatat64(unsigned int dfd, char __user *filename,
909 struct stat64_emu31 __user* statbuf, int flag)
910{
911 struct kstat stat;
912 int error = -EINVAL;
913
914 if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0)
915 goto out;
916
917 if (flag & AT_SYMLINK_NOFOLLOW)
918 error = vfs_lstat_fd(dfd, filename, &stat);
919 else
920 error = vfs_stat_fd(dfd, filename, &stat);
921
922 if (!error)
923 error = cp_stat64(statbuf, &stat);
924out:
925 return error;
926}
927
908/* 928/*
909 * Linux/i386 didn't use to be able to handle more than 929 * Linux/i386 didn't use to be able to handle more than
910 * 4 system call parameters, so these system calls used a memory 930 * 4 system call parameters, so these system calls used a memory