diff options
author | Christoph Hellwig <hch@infradead.org> | 2009-04-08 22:34:03 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-04-21 05:02:52 +0200 |
commit | 2eae7a1874ca5be3232765d89e0250a449f1bc90 (patch) | |
tree | 571f62f170623b98ab7b673fb18ea1c2c2582604 /fs/compat.c | |
parent | Separate out common fstatat code into vfs_fstatat (diff) | |
download | linux-2eae7a1874ca5be3232765d89e0250a449f1bc90.tar.xz linux-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.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/fs/compat.c b/fs/compat.c index dda72e267092..379a399bf5c3 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 |