Annotation of /trunk/kernel26-alx/patches-2.6.27-r3/0150-2.6.27.51-all-fixes.patch
Parent Directory | Revision Log
Revision 1176 -
(hide annotations)
(download)
Thu Oct 14 15:11:06 2010 UTC (13 years, 11 months ago) by niro
File size: 14882 byte(s)
Thu Oct 14 15:11:06 2010 UTC (13 years, 11 months ago) by niro
File size: 14882 byte(s)
-2.6.27-alx-r3: new magellan 0.5.2 kernel
1 | niro | 1176 | diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c |
2 | index 001c099..07e27f7 100644 | ||
3 | --- a/arch/x86/xen/enlighten.c | ||
4 | +++ b/arch/x86/xen/enlighten.c | ||
5 | @@ -1179,7 +1179,7 @@ static const struct pv_time_ops xen_time_ops __initdata = { | ||
6 | .set_wallclock = xen_set_wallclock, | ||
7 | .get_wallclock = xen_get_wallclock, | ||
8 | .get_tsc_khz = xen_tsc_khz, | ||
9 | - .sched_clock = xen_sched_clock, | ||
10 | + .sched_clock = xen_clocksource_read, | ||
11 | }; | ||
12 | |||
13 | static const struct pv_cpu_ops xen_cpu_ops __initdata = { | ||
14 | diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c | ||
15 | index 685b774..d0f176e 100644 | ||
16 | --- a/arch/x86/xen/time.c | ||
17 | +++ b/arch/x86/xen/time.c | ||
18 | @@ -30,8 +30,6 @@ | ||
19 | #define TIMER_SLOP 100000 | ||
20 | #define NS_PER_TICK (1000000000LL / HZ) | ||
21 | |||
22 | -static cycle_t xen_clocksource_read(void); | ||
23 | - | ||
24 | /* runstate info updated by Xen */ | ||
25 | static DEFINE_PER_CPU(struct vcpu_runstate_info, runstate); | ||
26 | |||
27 | @@ -158,45 +156,6 @@ static void do_stolen_accounting(void) | ||
28 | account_steal_time(idle_task(smp_processor_id()), ticks); | ||
29 | } | ||
30 | |||
31 | -/* | ||
32 | - * Xen sched_clock implementation. Returns the number of unstolen | ||
33 | - * nanoseconds, which is nanoseconds the VCPU spent in RUNNING+BLOCKED | ||
34 | - * states. | ||
35 | - */ | ||
36 | -unsigned long long xen_sched_clock(void) | ||
37 | -{ | ||
38 | - struct vcpu_runstate_info state; | ||
39 | - cycle_t now; | ||
40 | - u64 ret; | ||
41 | - s64 offset; | ||
42 | - | ||
43 | - /* | ||
44 | - * Ideally sched_clock should be called on a per-cpu basis | ||
45 | - * anyway, so preempt should already be disabled, but that's | ||
46 | - * not current practice at the moment. | ||
47 | - */ | ||
48 | - preempt_disable(); | ||
49 | - | ||
50 | - now = xen_clocksource_read(); | ||
51 | - | ||
52 | - get_runstate_snapshot(&state); | ||
53 | - | ||
54 | - WARN_ON(state.state != RUNSTATE_running); | ||
55 | - | ||
56 | - offset = now - state.state_entry_time; | ||
57 | - if (offset < 0) | ||
58 | - offset = 0; | ||
59 | - | ||
60 | - ret = state.time[RUNSTATE_blocked] + | ||
61 | - state.time[RUNSTATE_running] + | ||
62 | - offset; | ||
63 | - | ||
64 | - preempt_enable(); | ||
65 | - | ||
66 | - return ret; | ||
67 | -} | ||
68 | - | ||
69 | - | ||
70 | /* Get the TSC speed from Xen */ | ||
71 | unsigned long xen_tsc_khz(void) | ||
72 | { | ||
73 | @@ -213,7 +172,7 @@ unsigned long xen_tsc_khz(void) | ||
74 | return xen_khz; | ||
75 | } | ||
76 | |||
77 | -static cycle_t xen_clocksource_read(void) | ||
78 | +cycle_t xen_clocksource_read(void) | ||
79 | { | ||
80 | struct pvclock_vcpu_time_info *src; | ||
81 | cycle_t ret; | ||
82 | diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h | ||
83 | index dd3c231..8a3c823 100644 | ||
84 | --- a/arch/x86/xen/xen-ops.h | ||
85 | +++ b/arch/x86/xen/xen-ops.h | ||
86 | @@ -3,6 +3,7 @@ | ||
87 | |||
88 | #include <linux/init.h> | ||
89 | #include <linux/irqreturn.h> | ||
90 | +#include <linux/clocksource.h> | ||
91 | #include <xen/xen-ops.h> | ||
92 | |||
93 | /* These are code, but not functions. Defined in entry.S */ | ||
94 | @@ -37,7 +38,7 @@ unsigned long xen_tsc_khz(void); | ||
95 | void __init xen_time_init(void); | ||
96 | unsigned long xen_get_wallclock(void); | ||
97 | int xen_set_wallclock(unsigned long time); | ||
98 | -unsigned long long xen_sched_clock(void); | ||
99 | +cycle_t xen_clocksource_read(void); | ||
100 | |||
101 | irqreturn_t xen_debug_interrupt(int irq, void *dev_id); | ||
102 | |||
103 | diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c | ||
104 | index 39f6357..1a5d40d 100644 | ||
105 | --- a/drivers/char/nvram.c | ||
106 | +++ b/drivers/char/nvram.c | ||
107 | @@ -265,10 +265,16 @@ nvram_write(struct file *file, const char __user *buf, size_t count, loff_t *ppo | ||
108 | unsigned char contents[NVRAM_BYTES]; | ||
109 | unsigned i = *ppos; | ||
110 | unsigned char *tmp; | ||
111 | - int len; | ||
112 | |||
113 | - len = (NVRAM_BYTES - i) < count ? (NVRAM_BYTES - i) : count; | ||
114 | - if (copy_from_user(contents, buf, len)) | ||
115 | + if (i >= NVRAM_BYTES) | ||
116 | + return 0; /* Past EOF */ | ||
117 | + | ||
118 | + if (count > NVRAM_BYTES - i) | ||
119 | + count = NVRAM_BYTES - i; | ||
120 | + if (count > NVRAM_BYTES) | ||
121 | + return -EFAULT; /* Can't happen, but prove it to gcc */ | ||
122 | + | ||
123 | + if (copy_from_user(contents, buf, count)) | ||
124 | return -EFAULT; | ||
125 | |||
126 | spin_lock_irq(&rtc_lock); | ||
127 | @@ -276,7 +282,7 @@ nvram_write(struct file *file, const char __user *buf, size_t count, loff_t *ppo | ||
128 | if (!__nvram_check_checksum()) | ||
129 | goto checksum_err; | ||
130 | |||
131 | - for (tmp = contents; count-- > 0 && i < NVRAM_BYTES; ++i, ++tmp) | ||
132 | + for (tmp = contents; count--; ++i, ++tmp) | ||
133 | __nvram_write_byte(*tmp, i); | ||
134 | |||
135 | __nvram_set_checksum(); | ||
136 | diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c | ||
137 | index dbf51e9..6fcedbe 100644 | ||
138 | --- a/drivers/md/raid10.c | ||
139 | +++ b/drivers/md/raid10.c | ||
140 | @@ -818,11 +818,29 @@ static int make_request(struct request_queue *q, struct bio * bio) | ||
141 | */ | ||
142 | bp = bio_split(bio, bio_split_pool, | ||
143 | chunk_sects - (bio->bi_sector & (chunk_sects - 1)) ); | ||
144 | + | ||
145 | + /* Each of these 'make_request' calls will call 'wait_barrier'. | ||
146 | + * If the first succeeds but the second blocks due to the resync | ||
147 | + * thread raising the barrier, we will deadlock because the | ||
148 | + * IO to the underlying device will be queued in generic_make_request | ||
149 | + * and will never complete, so will never reduce nr_pending. | ||
150 | + * So increment nr_waiting here so no new raise_barriers will | ||
151 | + * succeed, and so the second wait_barrier cannot block. | ||
152 | + */ | ||
153 | + spin_lock_irq(&conf->resync_lock); | ||
154 | + conf->nr_waiting++; | ||
155 | + spin_unlock_irq(&conf->resync_lock); | ||
156 | + | ||
157 | if (make_request(q, &bp->bio1)) | ||
158 | generic_make_request(&bp->bio1); | ||
159 | if (make_request(q, &bp->bio2)) | ||
160 | generic_make_request(&bp->bio2); | ||
161 | |||
162 | + spin_lock_irq(&conf->resync_lock); | ||
163 | + conf->nr_waiting--; | ||
164 | + wake_up(&conf->wait_barrier); | ||
165 | + spin_unlock_irq(&conf->resync_lock); | ||
166 | + | ||
167 | bio_pair_release(bp); | ||
168 | return 0; | ||
169 | bad_map: | ||
170 | diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c | ||
171 | index 5368689..e09684e 100644 | ||
172 | --- a/drivers/pci/quirks.c | ||
173 | +++ b/drivers/pci/quirks.c | ||
174 | @@ -1833,6 +1833,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disabl | ||
175 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3336, quirk_disable_all_msi); | ||
176 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi); | ||
177 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3364, quirk_disable_all_msi); | ||
178 | +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8380_0, quirk_disable_all_msi); | ||
179 | |||
180 | /* Disable MSI on chipsets that are known to not support it */ | ||
181 | static void __devinit quirk_disable_msi(struct pci_dev *dev) | ||
182 | diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c | ||
183 | index bbc723a..45cb94c 100644 | ||
184 | --- a/fs/ecryptfs/file.c | ||
185 | +++ b/fs/ecryptfs/file.c | ||
186 | @@ -199,7 +199,7 @@ static int ecryptfs_open(struct inode *inode, struct file *file) | ||
187 | "the persistent file for the dentry with name " | ||
188 | "[%s]; rc = [%d]\n", __func__, | ||
189 | ecryptfs_dentry->d_name.name, rc); | ||
190 | - goto out; | ||
191 | + goto out_free; | ||
192 | } | ||
193 | } | ||
194 | if ((ecryptfs_inode_to_private(inode)->lower_file->f_flags & O_RDONLY) | ||
195 | @@ -207,7 +207,7 @@ static int ecryptfs_open(struct inode *inode, struct file *file) | ||
196 | rc = -EPERM; | ||
197 | printk(KERN_WARNING "%s: Lower persistent file is RO; eCryptfs " | ||
198 | "file must hence be opened RO\n", __func__); | ||
199 | - goto out; | ||
200 | + goto out_free; | ||
201 | } | ||
202 | ecryptfs_set_file_lower( | ||
203 | file, ecryptfs_inode_to_private(inode)->lower_file); | ||
204 | @@ -303,12 +303,40 @@ static int ecryptfs_fasync(int fd, struct file *file, int flag) | ||
205 | return rc; | ||
206 | } | ||
207 | |||
208 | -static int ecryptfs_ioctl(struct inode *inode, struct file *file, | ||
209 | - unsigned int cmd, unsigned long arg); | ||
210 | +static long | ||
211 | +ecryptfs_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | ||
212 | +{ | ||
213 | + struct file *lower_file = NULL; | ||
214 | + long rc = -ENOTTY; | ||
215 | + | ||
216 | + if (ecryptfs_file_to_private(file)) | ||
217 | + lower_file = ecryptfs_file_to_lower(file); | ||
218 | + if (lower_file && lower_file->f_op && lower_file->f_op->unlocked_ioctl) | ||
219 | + rc = lower_file->f_op->unlocked_ioctl(lower_file, cmd, arg); | ||
220 | + return rc; | ||
221 | +} | ||
222 | + | ||
223 | +#ifdef CONFIG_COMPAT | ||
224 | +static long | ||
225 | +ecryptfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | ||
226 | +{ | ||
227 | + struct file *lower_file = NULL; | ||
228 | + long rc = -ENOIOCTLCMD; | ||
229 | + | ||
230 | + if (ecryptfs_file_to_private(file)) | ||
231 | + lower_file = ecryptfs_file_to_lower(file); | ||
232 | + if (lower_file && lower_file->f_op && lower_file->f_op->compat_ioctl) | ||
233 | + rc = lower_file->f_op->compat_ioctl(lower_file, cmd, arg); | ||
234 | + return rc; | ||
235 | +} | ||
236 | +#endif | ||
237 | |||
238 | const struct file_operations ecryptfs_dir_fops = { | ||
239 | .readdir = ecryptfs_readdir, | ||
240 | - .ioctl = ecryptfs_ioctl, | ||
241 | + .unlocked_ioctl = ecryptfs_unlocked_ioctl, | ||
242 | +#ifdef CONFIG_COMPAT | ||
243 | + .compat_ioctl = ecryptfs_compat_ioctl, | ||
244 | +#endif | ||
245 | .mmap = generic_file_mmap, | ||
246 | .open = ecryptfs_open, | ||
247 | .flush = ecryptfs_flush, | ||
248 | @@ -325,7 +353,10 @@ const struct file_operations ecryptfs_main_fops = { | ||
249 | .write = do_sync_write, | ||
250 | .aio_write = generic_file_aio_write, | ||
251 | .readdir = ecryptfs_readdir, | ||
252 | - .ioctl = ecryptfs_ioctl, | ||
253 | + .unlocked_ioctl = ecryptfs_unlocked_ioctl, | ||
254 | +#ifdef CONFIG_COMPAT | ||
255 | + .compat_ioctl = ecryptfs_compat_ioctl, | ||
256 | +#endif | ||
257 | .mmap = generic_file_mmap, | ||
258 | .open = ecryptfs_open, | ||
259 | .flush = ecryptfs_flush, | ||
260 | @@ -334,20 +365,3 @@ const struct file_operations ecryptfs_main_fops = { | ||
261 | .fasync = ecryptfs_fasync, | ||
262 | .splice_read = generic_file_splice_read, | ||
263 | }; | ||
264 | - | ||
265 | -static int | ||
266 | -ecryptfs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | ||
267 | - unsigned long arg) | ||
268 | -{ | ||
269 | - int rc = 0; | ||
270 | - struct file *lower_file = NULL; | ||
271 | - | ||
272 | - if (ecryptfs_file_to_private(file)) | ||
273 | - lower_file = ecryptfs_file_to_lower(file); | ||
274 | - if (lower_file && lower_file->f_op && lower_file->f_op->ioctl) | ||
275 | - rc = lower_file->f_op->ioctl(ecryptfs_inode_to_lower(inode), | ||
276 | - lower_file, cmd, arg); | ||
277 | - else | ||
278 | - rc = -ENOTTY; | ||
279 | - return rc; | ||
280 | -} | ||
281 | diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c | ||
282 | index 9b7f2cd..f35a40b 100644 | ||
283 | --- a/fs/jfs/xattr.c | ||
284 | +++ b/fs/jfs/xattr.c | ||
285 | @@ -85,46 +85,25 @@ struct ea_buffer { | ||
286 | #define EA_MALLOC 0x0008 | ||
287 | |||
288 | |||
289 | +static int is_known_namespace(const char *name) | ||
290 | +{ | ||
291 | + if (strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN) && | ||
292 | + strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN) && | ||
293 | + strncmp(name, XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) && | ||
294 | + strncmp(name, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN)) | ||
295 | + return false; | ||
296 | + | ||
297 | + return true; | ||
298 | +} | ||
299 | + | ||
300 | /* | ||
301 | * These three routines are used to recognize on-disk extended attributes | ||
302 | * that are in a recognized namespace. If the attribute is not recognized, | ||
303 | * "os2." is prepended to the name | ||
304 | */ | ||
305 | -static inline int is_os2_xattr(struct jfs_ea *ea) | ||
306 | +static int is_os2_xattr(struct jfs_ea *ea) | ||
307 | { | ||
308 | - /* | ||
309 | - * Check for "system." | ||
310 | - */ | ||
311 | - if ((ea->namelen >= XATTR_SYSTEM_PREFIX_LEN) && | ||
312 | - !strncmp(ea->name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) | ||
313 | - return false; | ||
314 | - /* | ||
315 | - * Check for "user." | ||
316 | - */ | ||
317 | - if ((ea->namelen >= XATTR_USER_PREFIX_LEN) && | ||
318 | - !strncmp(ea->name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) | ||
319 | - return false; | ||
320 | - /* | ||
321 | - * Check for "security." | ||
322 | - */ | ||
323 | - if ((ea->namelen >= XATTR_SECURITY_PREFIX_LEN) && | ||
324 | - !strncmp(ea->name, XATTR_SECURITY_PREFIX, | ||
325 | - XATTR_SECURITY_PREFIX_LEN)) | ||
326 | - return false; | ||
327 | - /* | ||
328 | - * Check for "trusted." | ||
329 | - */ | ||
330 | - if ((ea->namelen >= XATTR_TRUSTED_PREFIX_LEN) && | ||
331 | - !strncmp(ea->name, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN)) | ||
332 | - return false; | ||
333 | - /* | ||
334 | - * Add any other valid namespace prefixes here | ||
335 | - */ | ||
336 | - | ||
337 | - /* | ||
338 | - * We assume it's OS/2's flat namespace | ||
339 | - */ | ||
340 | - return true; | ||
341 | + return !is_known_namespace(ea->name); | ||
342 | } | ||
343 | |||
344 | static inline int name_size(struct jfs_ea *ea) | ||
345 | @@ -768,13 +747,23 @@ static int can_set_xattr(struct inode *inode, const char *name, | ||
346 | if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) | ||
347 | return can_set_system_xattr(inode, name, value, value_len); | ||
348 | |||
349 | + if (!strncmp(name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN)) { | ||
350 | + /* | ||
351 | + * This makes sure that we aren't trying to set an | ||
352 | + * attribute in a different namespace by prefixing it | ||
353 | + * with "os2." | ||
354 | + */ | ||
355 | + if (is_known_namespace(name + XATTR_OS2_PREFIX_LEN)) | ||
356 | + return -EOPNOTSUPP; | ||
357 | + return 0; | ||
358 | + } | ||
359 | + | ||
360 | /* | ||
361 | * Don't allow setting an attribute in an unknown namespace. | ||
362 | */ | ||
363 | if (strncmp(name, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) && | ||
364 | strncmp(name, XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) && | ||
365 | - strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN) && | ||
366 | - strncmp(name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN)) | ||
367 | + strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) | ||
368 | return -EOPNOTSUPP; | ||
369 | |||
370 | return 0; | ||
371 | @@ -956,19 +945,8 @@ ssize_t __jfs_getxattr(struct inode *inode, const char *name, void *data, | ||
372 | int xattr_size; | ||
373 | ssize_t size; | ||
374 | int namelen = strlen(name); | ||
375 | - char *os2name = NULL; | ||
376 | char *value; | ||
377 | |||
378 | - if (strncmp(name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN) == 0) { | ||
379 | - os2name = kmalloc(namelen - XATTR_OS2_PREFIX_LEN + 1, | ||
380 | - GFP_KERNEL); | ||
381 | - if (!os2name) | ||
382 | - return -ENOMEM; | ||
383 | - strcpy(os2name, name + XATTR_OS2_PREFIX_LEN); | ||
384 | - name = os2name; | ||
385 | - namelen -= XATTR_OS2_PREFIX_LEN; | ||
386 | - } | ||
387 | - | ||
388 | down_read(&JFS_IP(inode)->xattr_sem); | ||
389 | |||
390 | xattr_size = ea_get(inode, &ea_buf, 0); | ||
391 | @@ -1006,8 +984,6 @@ ssize_t __jfs_getxattr(struct inode *inode, const char *name, void *data, | ||
392 | out: | ||
393 | up_read(&JFS_IP(inode)->xattr_sem); | ||
394 | |||
395 | - kfree(os2name); | ||
396 | - | ||
397 | return size; | ||
398 | } | ||
399 | |||
400 | @@ -1016,6 +992,19 @@ ssize_t jfs_getxattr(struct dentry *dentry, const char *name, void *data, | ||
401 | { | ||
402 | int err; | ||
403 | |||
404 | + if (strncmp(name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN) == 0) { | ||
405 | + /* | ||
406 | + * skip past "os2." prefix | ||
407 | + */ | ||
408 | + name += XATTR_OS2_PREFIX_LEN; | ||
409 | + /* | ||
410 | + * Don't allow retrieving properly prefixed attributes | ||
411 | + * by prepending them with "os2." | ||
412 | + */ | ||
413 | + if (is_known_namespace(name)) | ||
414 | + return -EOPNOTSUPP; | ||
415 | + } | ||
416 | + | ||
417 | err = __jfs_getxattr(dentry->d_inode, name, data, buf_size); | ||
418 | |||
419 | return err; | ||
420 | diff --git a/fs/signalfd.c b/fs/signalfd.c | ||
421 | index b07565c..d98bea8 100644 | ||
422 | --- a/fs/signalfd.c | ||
423 | +++ b/fs/signalfd.c | ||
424 | @@ -87,6 +87,7 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo, | ||
425 | err |= __put_user(kinfo->si_tid, &uinfo->ssi_tid); | ||
426 | err |= __put_user(kinfo->si_overrun, &uinfo->ssi_overrun); | ||
427 | err |= __put_user((long) kinfo->si_ptr, &uinfo->ssi_ptr); | ||
428 | + err |= __put_user(kinfo->si_int, &uinfo->ssi_int); | ||
429 | break; | ||
430 | case __SI_POLL: | ||
431 | err |= __put_user(kinfo->si_band, &uinfo->ssi_band); | ||
432 | @@ -110,6 +111,7 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo, | ||
433 | err |= __put_user(kinfo->si_pid, &uinfo->ssi_pid); | ||
434 | err |= __put_user(kinfo->si_uid, &uinfo->ssi_uid); | ||
435 | err |= __put_user((long) kinfo->si_ptr, &uinfo->ssi_ptr); | ||
436 | + err |= __put_user(kinfo->si_int, &uinfo->ssi_int); | ||
437 | break; | ||
438 | default: | ||
439 | /* | ||
440 | diff --git a/fs/splice.c b/fs/splice.c | ||
441 | index 2f2d8c1..4e1ea5e 100644 | ||
442 | --- a/fs/splice.c | ||
443 | +++ b/fs/splice.c | ||
444 | @@ -366,17 +366,7 @@ __generic_file_splice_read(struct file *in, loff_t *ppos, | ||
445 | * If the page isn't uptodate, we may need to start io on it | ||
446 | */ | ||
447 | if (!PageUptodate(page)) { | ||
448 | - /* | ||
449 | - * If in nonblock mode then dont block on waiting | ||
450 | - * for an in-flight io page | ||
451 | - */ | ||
452 | - if (flags & SPLICE_F_NONBLOCK) { | ||
453 | - if (!trylock_page(page)) { | ||
454 | - error = -EAGAIN; | ||
455 | - break; | ||
456 | - } | ||
457 | - } else | ||
458 | - lock_page(page); | ||
459 | + lock_page(page); | ||
460 | |||
461 | /* | ||
462 | * Page was truncated, or invalidated by the | ||
463 | diff --git a/mm/backing-dev.c b/mm/backing-dev.c | ||
464 | index f2e574d..801c08b 100644 | ||
465 | --- a/mm/backing-dev.c | ||
466 | +++ b/mm/backing-dev.c | ||
467 | @@ -176,6 +176,9 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent, | ||
468 | int ret = 0; | ||
469 | struct device *dev; | ||
470 | |||
471 | + if (bdi->dev) /* The driver needs to use separate queues per device */ | ||
472 | + goto exit; | ||
473 | + | ||
474 | va_start(args, fmt); | ||
475 | dev = device_create_vargs(bdi_class, parent, MKDEV(0, 0), bdi, fmt, args); | ||
476 | va_end(args); |