diff options
author | Oleg Drokin <green@linuxhacker.ru> | 2009-04-08 12:05:42 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-04-20 23:02:51 -0400 |
commit | 0112fc2229847feb6c4eb011e6833d8f1742a375 (patch) | |
tree | c5bda0b4f5a5f942478faf2fb5961df7fbd15546 /arch/s390 | |
parent | fd56d242b3b80b6f2ca174272b20029aae61df75 (diff) |
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/s390')
-rw-r--r-- | arch/s390/kernel/compat_linux.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 6cc87d8c8682..002c70d3cb75 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -702,20 +702,12 @@ asmlinkage long sys32_fstatat64(unsigned int dfd, char __user *filename, | |||
702 | struct stat64_emu31 __user* statbuf, int flag) | 702 | struct stat64_emu31 __user* statbuf, int flag) |
703 | { | 703 | { |
704 | struct kstat stat; | 704 | struct kstat stat; |
705 | int error = -EINVAL; | 705 | int error; |
706 | |||
707 | if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) | ||
708 | goto out; | ||
709 | |||
710 | if (flag & AT_SYMLINK_NOFOLLOW) | ||
711 | error = vfs_lstat_fd(dfd, filename, &stat); | ||
712 | else | ||
713 | error = vfs_stat_fd(dfd, filename, &stat); | ||
714 | 706 | ||
715 | if (!error) | 707 | error = vfs_fstatat(dfd, filename, &stat, flag); |
716 | error = cp_stat64(statbuf, &stat); | 708 | if (error) |
717 | out: | 709 | return error; |
718 | return error; | 710 | return cp_stat64(statbuf, &stat); |
719 | } | 711 | } |
720 | 712 | ||
721 | /* | 713 | /* |