aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-21 10:56:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-21 10:56:17 -0400
commit9a41fe3415bbef2c0c08ac232dc3a17add0dee58 (patch)
tree6c2440e3dd3babd4643396de9ba44303d8d3a7b4 /arch
parent8b9cf76d0fa6cd98fe42dd2f86460d6ede55fed8 (diff)
parentbe9208dff23af904655807672dd8235abf6ac039 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: reiserfs: fix j_last_flush_trans_id type fs: Mark get_filesystem_list() as __init function. kill vfs_stat_fd / vfs_lstat_fd Separate out common fstatat code into vfs_fstatat ecryptfs: use memdup_user() ncpfs: use memdup_user() xfs: use memdup_user() sysfs: use memdup_user() btrfs: use memdup_user() xattr: use memdup_user() autofs4: use memchr() in invalid_string() Documentation/filesystems: remove out of date reference to BKL being held Fix i_mutex vs. readdir handling in nfsd fs/compat_ioctl: fix build when !BLOCK Fix autofs_expire() No need for crossing to mountpoint in audit_tag_tree() Safer nfsd_cross_mnt() Touch all affected namespaces on propagation of mount Fix AUTOFS_DEV_IOCTL_REQUESTER_CMD
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/sys_oabi-compat.c19
-rw-r--r--arch/s390/kernel/compat_linux.c18
-rw-r--r--arch/sparc/kernel/sys_sparc32.c19
-rw-r--r--arch/x86/ia32/sys_ia32.c19
4 files changed, 20 insertions, 55 deletions
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c
index e04173c7e621..d59a0cd537f0 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,
177 int flag) 177 int flag)
178{ 178{
179 struct kstat stat; 179 struct kstat stat;
180 int error = -EINVAL; 180 int error;
181 181
182 if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) 182 error = vfs_fstatat(dfd, filename, &stat, flag);
183 goto out; 183 if (error)
184 184 return error;
185 if (flag & AT_SYMLINK_NOFOLLOW) 185 return cp_oldabi_stat64(&stat, statbuf);
186 error = vfs_lstat_fd(dfd, filename, &stat);
187 else
188 error = vfs_stat_fd(dfd, filename, &stat);
189
190 if (!error)
191 error = cp_oldabi_stat64(&stat, statbuf);
192
193out:
194 return error;
195} 186}
196 187
197struct oabi_flock64 { 188struct oabi_flock64 {
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)
717out: 709 return error;
718 return error; 710 return cp_stat64(statbuf, &stat);
719} 711}
720 712
721/* 713/*
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c
index e800503879e4..f5000a460c05 100644
--- a/arch/sparc/kernel/sys_sparc32.c
+++ b/arch/sparc/kernel/sys_sparc32.c
@@ -206,21 +206,12 @@ asmlinkage long compat_sys_fstatat64(unsigned int dfd, char __user *filename,
206 struct compat_stat64 __user * statbuf, int flag) 206 struct compat_stat64 __user * statbuf, int flag)
207{ 207{
208 struct kstat stat; 208 struct kstat stat;
209 int error = -EINVAL; 209 int error;
210
211 if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0)
212 goto out;
213
214 if (flag & AT_SYMLINK_NOFOLLOW)
215 error = vfs_lstat_fd(dfd, filename, &stat);
216 else
217 error = vfs_stat_fd(dfd, filename, &stat);
218
219 if (!error)
220 error = cp_compat_stat64(&stat, statbuf);
221 210
222out: 211 error = vfs_fstatat(dfd, filename, &stat, flag);
223 return error; 212 if (error)
213 return error;
214 return cp_compat_stat64(&stat, statbuf);
224} 215}
225 216
226asmlinkage long compat_sys_sysfs(int option, u32 arg1, u32 arg2) 217asmlinkage long compat_sys_sysfs(int option, u32 arg1, u32 arg2)
diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c
index efac92fd1efb..085a8c35f149 100644
--- a/arch/x86/ia32/sys_ia32.c
+++ b/arch/x86/ia32/sys_ia32.c
@@ -129,21 +129,12 @@ asmlinkage long sys32_fstatat(unsigned int dfd, char __user *filename,
129 struct stat64 __user *statbuf, int flag) 129 struct stat64 __user *statbuf, int flag)
130{ 130{
131 struct kstat stat; 131 struct kstat stat;
132 int error = -EINVAL; 132 int error;
133 133
134 if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) 134 error = vfs_fstatat(dfd, filename, &stat, flag);
135 goto out; 135 if (error)
136 136 return error;
137 if (flag & AT_SYMLINK_NOFOLLOW) 137 return cp_stat64(statbuf, &stat);
138 error = vfs_lstat_fd(dfd, filename, &stat);
139 else
140 error = vfs_stat_fd(dfd, filename, &stat);
141
142 if (!error)
143 error = cp_stat64(statbuf, &stat);
144
145out:
146 return error;
147} 138}
148 139
149/* 140/*