diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/alpha/kernel/osf_sys.c | 8 | ||||
-rw-r--r-- | arch/mips/include/asm/statfs.h | 12 | ||||
-rw-r--r-- | arch/parisc/hpux/sys_hpux.c | 10 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 12 | ||||
-rw-r--r-- | arch/s390/hypfs/inode.c | 6 | ||||
-rw-r--r-- | arch/s390/include/asm/statfs.h | 9 | ||||
-rw-r--r-- | arch/um/include/shared/os.h | 3 | ||||
-rw-r--r-- | arch/um/kernel/ksyms.c | 3 | ||||
-rw-r--r-- | arch/um/os-Linux/file.c | 15 | ||||
-rw-r--r-- | arch/um/os-Linux/user_syms.c | 4 |
10 files changed, 57 insertions, 25 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index de9d39717808..88131c6e42e3 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -234,11 +234,11 @@ linux_to_osf_statfs(struct kstatfs *linux_stat, struct osf_statfs __user *osf_st | |||
234 | } | 234 | } |
235 | 235 | ||
236 | static int | 236 | static int |
237 | do_osf_statfs(struct dentry * dentry, struct osf_statfs __user *buffer, | 237 | do_osf_statfs(struct path *path, struct osf_statfs __user *buffer, |
238 | unsigned long bufsiz) | 238 | unsigned long bufsiz) |
239 | { | 239 | { |
240 | struct kstatfs linux_stat; | 240 | struct kstatfs linux_stat; |
241 | int error = vfs_statfs(dentry, &linux_stat); | 241 | int error = vfs_statfs(path, &linux_stat); |
242 | if (!error) | 242 | if (!error) |
243 | error = linux_to_osf_statfs(&linux_stat, buffer, bufsiz); | 243 | error = linux_to_osf_statfs(&linux_stat, buffer, bufsiz); |
244 | return error; | 244 | return error; |
@@ -252,7 +252,7 @@ SYSCALL_DEFINE3(osf_statfs, char __user *, pathname, | |||
252 | 252 | ||
253 | retval = user_path(pathname, &path); | 253 | retval = user_path(pathname, &path); |
254 | if (!retval) { | 254 | if (!retval) { |
255 | retval = do_osf_statfs(path.dentry, buffer, bufsiz); | 255 | retval = do_osf_statfs(&path buffer, bufsiz); |
256 | path_put(&path); | 256 | path_put(&path); |
257 | } | 257 | } |
258 | return retval; | 258 | return retval; |
@@ -267,7 +267,7 @@ SYSCALL_DEFINE3(osf_fstatfs, unsigned long, fd, | |||
267 | retval = -EBADF; | 267 | retval = -EBADF; |
268 | file = fget(fd); | 268 | file = fget(fd); |
269 | if (file) { | 269 | if (file) { |
270 | retval = do_osf_statfs(file->f_path.dentry, buffer, bufsiz); | 270 | retval = do_osf_statfs(&file->f_path, buffer, bufsiz); |
271 | fput(file); | 271 | fput(file); |
272 | } | 272 | } |
273 | return retval; | 273 | return retval; |
diff --git a/arch/mips/include/asm/statfs.h b/arch/mips/include/asm/statfs.h index c3ddf973c1c0..0f805c7a42a5 100644 --- a/arch/mips/include/asm/statfs.h +++ b/arch/mips/include/asm/statfs.h | |||
@@ -33,7 +33,8 @@ struct statfs { | |||
33 | /* Linux specials */ | 33 | /* Linux specials */ |
34 | __kernel_fsid_t f_fsid; | 34 | __kernel_fsid_t f_fsid; |
35 | long f_namelen; | 35 | long f_namelen; |
36 | long f_spare[6]; | 36 | long f_flags; |
37 | long f_spare[5]; | ||
37 | }; | 38 | }; |
38 | 39 | ||
39 | #if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32) | 40 | #if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32) |
@@ -53,7 +54,8 @@ struct statfs64 { | |||
53 | __u64 f_bavail; | 54 | __u64 f_bavail; |
54 | __kernel_fsid_t f_fsid; | 55 | __kernel_fsid_t f_fsid; |
55 | __u32 f_namelen; | 56 | __u32 f_namelen; |
56 | __u32 f_spare[6]; | 57 | __u32 f_flags; |
58 | __u32 f_spare[5]; | ||
57 | }; | 59 | }; |
58 | 60 | ||
59 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 61 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
@@ -73,7 +75,8 @@ struct statfs64 { /* Same as struct statfs */ | |||
73 | /* Linux specials */ | 75 | /* Linux specials */ |
74 | __kernel_fsid_t f_fsid; | 76 | __kernel_fsid_t f_fsid; |
75 | long f_namelen; | 77 | long f_namelen; |
76 | long f_spare[6]; | 78 | long f_flags; |
79 | long f_spare[5]; | ||
77 | }; | 80 | }; |
78 | 81 | ||
79 | struct compat_statfs64 { | 82 | struct compat_statfs64 { |
@@ -88,7 +91,8 @@ struct compat_statfs64 { | |||
88 | __u64 f_bavail; | 91 | __u64 f_bavail; |
89 | __kernel_fsid_t f_fsid; | 92 | __kernel_fsid_t f_fsid; |
90 | __u32 f_namelen; | 93 | __u32 f_namelen; |
91 | __u32 f_spare[6]; | 94 | __u32 f_flags; |
95 | __u32 f_spare[5]; | ||
92 | }; | 96 | }; |
93 | 97 | ||
94 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 98 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c index 92343bd35fa3..ba430a03bc7a 100644 --- a/arch/parisc/hpux/sys_hpux.c +++ b/arch/parisc/hpux/sys_hpux.c | |||
@@ -145,7 +145,7 @@ static int hpux_ustat(dev_t dev, struct hpux_ustat __user *ubuf) | |||
145 | s = user_get_super(dev); | 145 | s = user_get_super(dev); |
146 | if (s == NULL) | 146 | if (s == NULL) |
147 | goto out; | 147 | goto out; |
148 | err = vfs_statfs(s->s_root, &sbuf); | 148 | err = statfs_by_dentry(s->s_root, &sbuf); |
149 | drop_super(s); | 149 | drop_super(s); |
150 | if (err) | 150 | if (err) |
151 | goto out; | 151 | goto out; |
@@ -186,12 +186,12 @@ struct hpux_statfs { | |||
186 | int16_t f_pad; | 186 | int16_t f_pad; |
187 | }; | 187 | }; |
188 | 188 | ||
189 | static int vfs_statfs_hpux(struct dentry *dentry, struct hpux_statfs *buf) | 189 | static int do_statfs_hpux(struct path *path, struct hpux_statfs *buf) |
190 | { | 190 | { |
191 | struct kstatfs st; | 191 | struct kstatfs st; |
192 | int retval; | 192 | int retval; |
193 | 193 | ||
194 | retval = vfs_statfs(dentry, &st); | 194 | retval = vfs_statfs(path, &st); |
195 | if (retval) | 195 | if (retval) |
196 | return retval; | 196 | return retval; |
197 | 197 | ||
@@ -219,7 +219,7 @@ asmlinkage long hpux_statfs(const char __user *pathname, | |||
219 | error = user_path(pathname, &path); | 219 | error = user_path(pathname, &path); |
220 | if (!error) { | 220 | if (!error) { |
221 | struct hpux_statfs tmp; | 221 | struct hpux_statfs tmp; |
222 | error = vfs_statfs_hpux(path.dentry, &tmp); | 222 | error = do_statfs_hpux(&path, &tmp); |
223 | if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) | 223 | if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) |
224 | error = -EFAULT; | 224 | error = -EFAULT; |
225 | path_put(&path); | 225 | path_put(&path); |
@@ -237,7 +237,7 @@ asmlinkage long hpux_fstatfs(unsigned int fd, struct hpux_statfs __user * buf) | |||
237 | file = fget(fd); | 237 | file = fget(fd); |
238 | if (!file) | 238 | if (!file) |
239 | goto out; | 239 | goto out; |
240 | error = vfs_statfs_hpux(file->f_path.dentry, &tmp); | 240 | error = do_statfs_hpux(&file->f_path, &tmp); |
241 | if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) | 241 | if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) |
242 | error = -EFAULT; | 242 | error = -EFAULT; |
243 | fput(file); | 243 | fput(file); |
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index e5e5f823d687..5dec408d6703 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -110,7 +110,9 @@ spufs_setattr(struct dentry *dentry, struct iattr *attr) | |||
110 | if ((attr->ia_valid & ATTR_SIZE) && | 110 | if ((attr->ia_valid & ATTR_SIZE) && |
111 | (attr->ia_size != inode->i_size)) | 111 | (attr->ia_size != inode->i_size)) |
112 | return -EINVAL; | 112 | return -EINVAL; |
113 | return inode_setattr(inode, attr); | 113 | setattr_copy(inode, attr); |
114 | mark_inode_dirty(inode); | ||
115 | return 0; | ||
114 | } | 116 | } |
115 | 117 | ||
116 | 118 | ||
@@ -141,15 +143,14 @@ out: | |||
141 | } | 143 | } |
142 | 144 | ||
143 | static void | 145 | static void |
144 | spufs_delete_inode(struct inode *inode) | 146 | spufs_evict_inode(struct inode *inode) |
145 | { | 147 | { |
146 | struct spufs_inode_info *ei = SPUFS_I(inode); | 148 | struct spufs_inode_info *ei = SPUFS_I(inode); |
147 | 149 | end_writeback(inode); | |
148 | if (ei->i_ctx) | 150 | if (ei->i_ctx) |
149 | put_spu_context(ei->i_ctx); | 151 | put_spu_context(ei->i_ctx); |
150 | if (ei->i_gang) | 152 | if (ei->i_gang) |
151 | put_spu_gang(ei->i_gang); | 153 | put_spu_gang(ei->i_gang); |
152 | clear_inode(inode); | ||
153 | } | 154 | } |
154 | 155 | ||
155 | static void spufs_prune_dir(struct dentry *dir) | 156 | static void spufs_prune_dir(struct dentry *dir) |
@@ -777,8 +778,7 @@ spufs_fill_super(struct super_block *sb, void *data, int silent) | |||
777 | .alloc_inode = spufs_alloc_inode, | 778 | .alloc_inode = spufs_alloc_inode, |
778 | .destroy_inode = spufs_destroy_inode, | 779 | .destroy_inode = spufs_destroy_inode, |
779 | .statfs = simple_statfs, | 780 | .statfs = simple_statfs, |
780 | .delete_inode = spufs_delete_inode, | 781 | .evict_inode = spufs_evict_inode, |
781 | .drop_inode = generic_delete_inode, | ||
782 | .show_options = generic_show_options, | 782 | .show_options = generic_show_options, |
783 | }; | 783 | }; |
784 | 784 | ||
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index 6b120f073043..98a4a4c267a7 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c | |||
@@ -117,10 +117,10 @@ static struct inode *hypfs_make_inode(struct super_block *sb, int mode) | |||
117 | return ret; | 117 | return ret; |
118 | } | 118 | } |
119 | 119 | ||
120 | static void hypfs_drop_inode(struct inode *inode) | 120 | static void hypfs_evict_inode(struct inode *inode) |
121 | { | 121 | { |
122 | end_writeback(inode); | ||
122 | kfree(inode->i_private); | 123 | kfree(inode->i_private); |
123 | generic_delete_inode(inode); | ||
124 | } | 124 | } |
125 | 125 | ||
126 | static int hypfs_open(struct inode *inode, struct file *filp) | 126 | static int hypfs_open(struct inode *inode, struct file *filp) |
@@ -460,7 +460,7 @@ static struct file_system_type hypfs_type = { | |||
460 | 460 | ||
461 | static const struct super_operations hypfs_s_ops = { | 461 | static const struct super_operations hypfs_s_ops = { |
462 | .statfs = simple_statfs, | 462 | .statfs = simple_statfs, |
463 | .drop_inode = hypfs_drop_inode, | 463 | .evict_inode = hypfs_evict_inode, |
464 | .show_options = hypfs_show_options, | 464 | .show_options = hypfs_show_options, |
465 | }; | 465 | }; |
466 | 466 | ||
diff --git a/arch/s390/include/asm/statfs.h b/arch/s390/include/asm/statfs.h index 06cc70307ece..3be7fbd406c8 100644 --- a/arch/s390/include/asm/statfs.h +++ b/arch/s390/include/asm/statfs.h | |||
@@ -33,7 +33,8 @@ struct statfs { | |||
33 | __kernel_fsid_t f_fsid; | 33 | __kernel_fsid_t f_fsid; |
34 | int f_namelen; | 34 | int f_namelen; |
35 | int f_frsize; | 35 | int f_frsize; |
36 | int f_spare[5]; | 36 | int f_flags; |
37 | int f_spare[4]; | ||
37 | }; | 38 | }; |
38 | 39 | ||
39 | struct statfs64 { | 40 | struct statfs64 { |
@@ -47,7 +48,8 @@ struct statfs64 { | |||
47 | __kernel_fsid_t f_fsid; | 48 | __kernel_fsid_t f_fsid; |
48 | int f_namelen; | 49 | int f_namelen; |
49 | int f_frsize; | 50 | int f_frsize; |
50 | int f_spare[5]; | 51 | int f_flags; |
52 | int f_spare[4]; | ||
51 | }; | 53 | }; |
52 | 54 | ||
53 | struct compat_statfs64 { | 55 | struct compat_statfs64 { |
@@ -61,7 +63,8 @@ struct compat_statfs64 { | |||
61 | __kernel_fsid_t f_fsid; | 63 | __kernel_fsid_t f_fsid; |
62 | __u32 f_namelen; | 64 | __u32 f_namelen; |
63 | __u32 f_frsize; | 65 | __u32 f_frsize; |
64 | __u32 f_spare[5]; | 66 | __u32 f_flags; |
67 | __u32 f_spare[4]; | ||
65 | }; | 68 | }; |
66 | 69 | ||
67 | #endif /* __s390x__ */ | 70 | #endif /* __s390x__ */ |
diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h index cd40fddcf99d..c4617baaa4f2 100644 --- a/arch/um/include/shared/os.h +++ b/arch/um/include/shared/os.h | |||
@@ -161,6 +161,9 @@ extern int os_stat_filesystem(char *path, long *bsize_out, | |||
161 | long *spare_out); | 161 | long *spare_out); |
162 | extern int os_change_dir(char *dir); | 162 | extern int os_change_dir(char *dir); |
163 | extern int os_fchange_dir(int fd); | 163 | extern int os_fchange_dir(int fd); |
164 | extern unsigned os_major(unsigned long long dev); | ||
165 | extern unsigned os_minor(unsigned long long dev); | ||
166 | extern unsigned long long os_makedev(unsigned major, unsigned minor); | ||
164 | 167 | ||
165 | /* start_up.c */ | 168 | /* start_up.c */ |
166 | extern void os_early_checks(void); | 169 | extern void os_early_checks(void); |
diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c index 836fc9b94707..0ae0dfcfbffb 100644 --- a/arch/um/kernel/ksyms.c +++ b/arch/um/kernel/ksyms.c | |||
@@ -58,6 +58,9 @@ EXPORT_SYMBOL(os_accept_connection); | |||
58 | EXPORT_SYMBOL(os_rcv_fd); | 58 | EXPORT_SYMBOL(os_rcv_fd); |
59 | EXPORT_SYMBOL(run_helper); | 59 | EXPORT_SYMBOL(run_helper); |
60 | EXPORT_SYMBOL(start_thread); | 60 | EXPORT_SYMBOL(start_thread); |
61 | EXPORT_SYMBOL(os_major); | ||
62 | EXPORT_SYMBOL(os_minor); | ||
63 | EXPORT_SYMBOL(os_makedev); | ||
61 | 64 | ||
62 | EXPORT_SYMBOL(add_sigio_fd); | 65 | EXPORT_SYMBOL(add_sigio_fd); |
63 | EXPORT_SYMBOL(ignore_sigio_fd); | 66 | EXPORT_SYMBOL(ignore_sigio_fd); |
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c index b5afcfd0f861..140e587bc0ad 100644 --- a/arch/um/os-Linux/file.c +++ b/arch/um/os-Linux/file.c | |||
@@ -561,3 +561,18 @@ int os_lock_file(int fd, int excl) | |||
561 | out: | 561 | out: |
562 | return err; | 562 | return err; |
563 | } | 563 | } |
564 | |||
565 | unsigned os_major(unsigned long long dev) | ||
566 | { | ||
567 | return major(dev); | ||
568 | } | ||
569 | |||
570 | unsigned os_minor(unsigned long long dev) | ||
571 | { | ||
572 | return minor(dev); | ||
573 | } | ||
574 | |||
575 | unsigned long long os_makedev(unsigned major, unsigned minor) | ||
576 | { | ||
577 | return makedev(major, minor); | ||
578 | } | ||
diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c index 89b48a116a89..05f5ea8e83d2 100644 --- a/arch/um/os-Linux/user_syms.c +++ b/arch/um/os-Linux/user_syms.c | |||
@@ -103,6 +103,10 @@ EXPORT_SYMBOL_PROTO(getuid); | |||
103 | EXPORT_SYMBOL_PROTO(fsync); | 103 | EXPORT_SYMBOL_PROTO(fsync); |
104 | EXPORT_SYMBOL_PROTO(fdatasync); | 104 | EXPORT_SYMBOL_PROTO(fdatasync); |
105 | 105 | ||
106 | EXPORT_SYMBOL_PROTO(lstat64); | ||
107 | EXPORT_SYMBOL_PROTO(fstat64); | ||
108 | EXPORT_SYMBOL_PROTO(mknod); | ||
109 | |||
106 | /* Export symbols used by GCC for the stack protector. */ | 110 | /* Export symbols used by GCC for the stack protector. */ |
107 | extern void __stack_smash_handler(void *) __attribute__((weak)); | 111 | extern void __stack_smash_handler(void *) __attribute__((weak)); |
108 | EXPORT_SYMBOL(__stack_smash_handler); | 112 | EXPORT_SYMBOL(__stack_smash_handler); |