diff options
author | Oleg Drokin <green@linuxhacker.ru> | 2009-04-08 20:05:42 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-04-20 23:02:51 -0400 |
commit | 0112fc2229847feb6c4eb011e6833d8f1742a375 (patch) | |
tree | c5bda0b4f5a5f942478faf2fb5961df7fbd15546 /arch/arm | |
parent | fd56d242b3b80b6f2ca174272b20029aae61df75 (diff) | |
download | linux-3.10-0112fc2229847feb6c4eb011e6833d8f1742a375.tar.gz linux-3.10-0112fc2229847feb6c4eb011e6833d8f1742a375.tar.bz2 linux-3.10-0112fc2229847feb6c4eb011e6833d8f1742a375.zip |
Separate out common fstatat code into vfs_fstatat
This is a version incorporating Christoph's suggestion.
Separate out common *fstatat functionality into a single function
instead of duplicating it all over the code.
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kernel/sys_oabi-compat.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index e04173c7e62..d59a0cd537f 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c @@ -177,21 +177,12 @@ asmlinkage long sys_oabi_fstatat64(int dfd, int flag) { struct kstat stat; - int error = -EINVAL; + int error; - if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) - goto out; - - if (flag & AT_SYMLINK_NOFOLLOW) - error = vfs_lstat_fd(dfd, filename, &stat); - else - error = vfs_stat_fd(dfd, filename, &stat); - - if (!error) - error = cp_oldabi_stat64(&stat, statbuf); - -out: - return error; + error = vfs_fstatat(dfd, filename, &stat, flag); + if (error) + return error; + return cp_oldabi_stat64(&stat, statbuf); } struct oabi_flock64 { |