diff -up ./arch/i386/kernel/entry.S.statat ./arch/i386/kernel/entry.S
--- ./arch/i386/kernel/entry.S.statat	2010-01-28 11:07:39.000000000 +0300
+++ ./arch/i386/kernel/entry.S	2010-01-28 11:09:38.000000000 +0300
@@ -1087,7 +1087,7 @@ ENTRY(sys_call_table)
 	.long sys_mknodat
 	.long sys_fchownat
 	.long sys_futimesat
-	.long sys_ni_syscall_warn /* 300 */
+	.long sys_fstatat64 /* 300 */
 	.long sys_unlinkat
 	.long sys_renameat
 	.long sys_linkat
diff -up ./arch/x86_64/ia32/ia32entry.S.statat ./arch/x86_64/ia32/ia32entry.S
--- ./arch/x86_64/ia32/ia32entry.S.statat	2010-01-28 11:07:39.000000000 +0300
+++ ./arch/x86_64/ia32/ia32entry.S	2010-01-28 11:10:18.000000000 +0300
@@ -629,7 +629,7 @@ ia32_sys_call_table:
 	.quad sys_mknodat
 	.quad sys_fchownat
 	.quad compat_sys_futimesat
-	.quad quiet_ni_syscall /* 300 */
+	.quad sys32_fstatat /* 300 */
 	.quad sys_unlinkat
 	.quad sys_renameat
 	.quad sys_linkat
diff -up ./arch/x86_64/ia32/sys_ia32.c.statat ./arch/x86_64/ia32/sys_ia32.c
--- ./arch/x86_64/ia32/sys_ia32.c.statat	2010-01-28 11:07:39.000000000 +0300
+++ ./arch/x86_64/ia32/sys_ia32.c	2010-01-28 15:57:05.000000000 +0300
@@ -185,6 +185,27 @@ sys32_fstat64(unsigned int fd, struct st
 	return ret;
 }
 
+asmlinkage long
+sys32_fstatat(unsigned int dfd, char __user *filename,
+		struct stat64 __user *statbuf, int flag)
+{
+	struct kstat64 stat;
+	int error = -EINVAL;
+
+	if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0)
+		goto out;
+
+	if (flag & AT_SYMLINK_NOFOLLOW)
+		error = vfs_lstat64_fd(dfd, filename, &stat);
+	else
+		error = vfs_stat64_fd(dfd, filename, &stat);
+
+	if (!error)
+		error = cp_stat64(statbuf, &stat);
+out:
+	return error;
+}
+
 /*
  * Linux/i386 didn't use to be able to handle more than
  * 4 system call parameters, so these system calls used a memory
diff -up ./fs/stat.c.statat ./fs/stat.c
--- ./fs/stat.c.statat	2010-01-28 15:57:40.000000000 +0300
+++ ./fs/stat.c	2010-01-28 15:56:59.000000000 +0300
@@ -161,7 +161,7 @@ int vfs_fstat(unsigned int fd, struct ks
 
 EXPORT_SYMBOL(vfs_fstat);
 
-static int vfs_stat64_fd(int dfd, char __user *name, struct kstat64 *stat)
+int vfs_stat64_fd(int dfd, char __user *name, struct kstat64 *stat)
 {
 	struct nameidata nd;
 	int error;
@@ -180,7 +180,7 @@ int vfs_stat64(char __user *name, struct
 }
 EXPORT_SYMBOL(vfs_stat64);
 
-static int vfs_lstat64_fd(int dfd, char __user *name, struct kstat64 *stat)
+int vfs_lstat64_fd(int dfd, char __user *name, struct kstat64 *stat)
 {
 	struct nameidata nd;
 	int error;
diff -up ./include/asm-i386/unistd.h.statat ./include/asm-i386/unistd.h
--- ./include/asm-i386/unistd.h.statat	2010-01-28 11:07:39.000000000 +0300
+++ ./include/asm-i386/unistd.h	2010-01-28 11:15:48.000000000 +0300
@@ -299,6 +299,7 @@
 #define __NR_mknodat            297
 #define __NR_fchownat           298
 #define __NR_futimesat          299
+#define __NR_fstatat64		300
 #define __NR_unlinkat           301
 #define __NR_renameat           302
 #define __NR_linkat             303
diff -up ./include/linux/fs.h.statat ./include/linux/fs.h
--- ./include/linux/fs.h.statat	2010-01-28 15:57:45.000000000 +0300
+++ ./include/linux/fs.h	2010-01-28 15:56:59.000000000 +0300
@@ -1669,6 +1669,8 @@ extern int vfs_fstat(unsigned int, struc
 extern int vfs_stat64(char __user *, struct kstat64 *);
 extern int vfs_lstat64(char __user *, struct kstat64 *);
 extern int vfs_fstat64(unsigned int, struct kstat64 *);
+extern int vfs_stat64_fd(int dfd, char __user *name, struct kstat64 *stat);
+extern int vfs_lstat64_fd(int dfd, char __user *name, struct kstat64 *stat);
 
 extern struct file_system_type *get_fs_type(const char *name);
 extern struct super_block *get_super(struct block_device *);
