summaryrefslogtreecommitdiff
path: root/fs/compat.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2009-04-08 16:34:03 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-04-20 23:02:52 -0400
commit2eae7a1874ca5be3232765d89e0250a449f1bc90 (patch)
tree571f62f170623b98ab7b673fb18ea1c2c2582604 /fs/compat.c
parent0112fc2229847feb6c4eb011e6833d8f1742a375 (diff)
downloadlinux-3.10-2eae7a1874ca5be3232765d89e0250a449f1bc90.tar.gz
linux-3.10-2eae7a1874ca5be3232765d89e0250a449f1bc90.tar.bz2
linux-3.10-2eae7a1874ca5be3232765d89e0250a449f1bc90.zip
kill vfs_stat_fd / vfs_lstat_fd
There's really no reason to keep vfs_stat_fd and vfs_lstat_fd with Oleg's vfs_fstatat. Use vfs_fstatat for the few cases having the directory fd, and switch all others to vfs_stat / vfs_lstat. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/compat.c')
-rw-r--r--fs/compat.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/fs/compat.c b/fs/compat.c
index dda72e26709..379a399bf5c 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -181,22 +181,24 @@ asmlinkage long compat_sys_newstat(char __user * filename,
struct compat_stat __user *statbuf)
{
struct kstat stat;
- int error = vfs_stat_fd(AT_FDCWD, filename, &stat);
+ int error;
- if (!error)
- error = cp_compat_stat(&stat, statbuf);
- return error;
+ error = vfs_stat(filename, &stat);
+ if (error)
+ return error;
+ return cp_compat_stat(&stat, statbuf);
}
asmlinkage long compat_sys_newlstat(char __user * filename,
struct compat_stat __user *statbuf)
{
struct kstat stat;
- int error = vfs_lstat_fd(AT_FDCWD, filename, &stat);
+ int error;
- if (!error)
- error = cp_compat_stat(&stat, statbuf);
- return error;
+ error = vfs_lstat(filename, &stat);
+ if (error)
+ return error;
+ return cp_compat_stat(&stat, statbuf);
}
#ifndef __ARCH_WANT_STAT64