Magellan Linux

Contents of /trunk/kernel-alx/patches-3.4/0117-3.4.18-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1946 - (show annotations) (download)
Wed Nov 14 15:25:09 2012 UTC (11 years, 5 months ago) by niro
File size: 18422 byte(s)
3.4.18-alx-r1
1 diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
2 index c2b77e5..5ccd6e8 100644
3 --- a/arch/arm/mach-exynos/common.c
4 +++ b/arch/arm/mach-exynos/common.c
5 @@ -44,7 +44,6 @@
6 #include <plat/fimc-core.h>
7 #include <plat/iic-core.h>
8 #include <plat/tv-core.h>
9 -#include <plat/spi-core.h>
10 #include <plat/regs-serial.h>
11
12 #include "common.h"
13 @@ -339,8 +338,6 @@ static void __init exynos4_map_io(void)
14
15 s5p_fb_setname(0, "exynos4-fb");
16 s5p_hdmi_setname("exynos4-hdmi");
17 -
18 - s3c64xx_spi_setname("exynos4210-spi");
19 }
20
21 static void __init exynos5_map_io(void)
22 @@ -361,8 +358,6 @@ static void __init exynos5_map_io(void)
23 s3c_i2c0_setname("s3c2440-i2c");
24 s3c_i2c1_setname("s3c2440-i2c");
25 s3c_i2c2_setname("s3c2440-i2c");
26 -
27 - s3c64xx_spi_setname("exynos4210-spi");
28 }
29
30 static void __init exynos4_init_clocks(int xtal)
31 diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c
32 index f74818d..7743fad 100644
33 --- a/arch/arm/mach-s3c24xx/s3c2416.c
34 +++ b/arch/arm/mach-s3c24xx/s3c2416.c
35 @@ -61,7 +61,6 @@
36 #include <plat/nand-core.h>
37 #include <plat/adc-core.h>
38 #include <plat/rtc-core.h>
39 -#include <plat/spi-core.h>
40
41 static struct map_desc s3c2416_iodesc[] __initdata = {
42 IODESC_ENT(WATCHDOG),
43 @@ -132,7 +131,6 @@ void __init s3c2416_map_io(void)
44 /* initialize device information early */
45 s3c2416_default_sdhci0();
46 s3c2416_default_sdhci1();
47 - s3c64xx_spi_setname("s3c2443-spi");
48
49 iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc));
50 }
51 diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c
52 index 165b6a6..ab648ad 100644
53 --- a/arch/arm/mach-s3c24xx/s3c2443.c
54 +++ b/arch/arm/mach-s3c24xx/s3c2443.c
55 @@ -43,7 +43,6 @@
56 #include <plat/nand-core.h>
57 #include <plat/adc-core.h>
58 #include <plat/rtc-core.h>
59 -#include <plat/spi-core.h>
60
61 static struct map_desc s3c2443_iodesc[] __initdata = {
62 IODESC_ENT(WATCHDOG),
63 @@ -101,9 +100,6 @@ void __init s3c2443_map_io(void)
64 s3c24xx_gpiocfg_default.set_pull = s3c2443_gpio_setpull;
65 s3c24xx_gpiocfg_default.get_pull = s3c2443_gpio_getpull;
66
67 - /* initialize device information early */
68 - s3c64xx_spi_setname("s3c2443-spi");
69 -
70 iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc));
71 }
72
73 diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c
74 index 111e404..6e6a0a9 100644
75 --- a/arch/arm/mach-s5p64x0/common.c
76 +++ b/arch/arm/mach-s5p64x0/common.c
77 @@ -44,7 +44,6 @@
78 #include <plat/sdhci.h>
79 #include <plat/adc-core.h>
80 #include <plat/fb-core.h>
81 -#include <plat/spi-core.h>
82 #include <plat/gpio-cfg.h>
83 #include <plat/regs-irqtype.h>
84 #include <plat/regs-serial.h>
85 @@ -180,7 +179,6 @@ void __init s5p6440_map_io(void)
86 /* initialize any device information early */
87 s3c_adc_setname("s3c64xx-adc");
88 s3c_fb_setname("s5p64x0-fb");
89 - s3c64xx_spi_setname("s5p64x0-spi");
90
91 s5p64x0_default_sdhci0();
92 s5p64x0_default_sdhci1();
93 @@ -195,7 +193,6 @@ void __init s5p6450_map_io(void)
94 /* initialize any device information early */
95 s3c_adc_setname("s3c64xx-adc");
96 s3c_fb_setname("s5p64x0-fb");
97 - s3c64xx_spi_setname("s5p64x0-spi");
98
99 s5p64x0_default_sdhci0();
100 s5p64x0_default_sdhci1();
101 diff --git a/arch/arm/mach-s5pc100/common.c b/arch/arm/mach-s5pc100/common.c
102 index cc6e561..6219086 100644
103 --- a/arch/arm/mach-s5pc100/common.c
104 +++ b/arch/arm/mach-s5pc100/common.c
105 @@ -45,7 +45,6 @@
106 #include <plat/fb-core.h>
107 #include <plat/iic-core.h>
108 #include <plat/onenand-core.h>
109 -#include <plat/spi-core.h>
110 #include <plat/regs-serial.h>
111 #include <plat/watchdog-reset.h>
112
113 @@ -166,8 +165,6 @@ void __init s5pc100_map_io(void)
114 s3c_onenand_setname("s5pc100-onenand");
115 s3c_fb_setname("s5pc100-fb");
116 s3c_cfcon_setname("s5pc100-pata");
117 -
118 - s3c64xx_spi_setname("s5pc100-spi");
119 }
120
121 void __init s5pc100_init_clocks(int xtal)
122 diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c
123 index a0c50ef..4c9e902 100644
124 --- a/arch/arm/mach-s5pv210/common.c
125 +++ b/arch/arm/mach-s5pv210/common.c
126 @@ -43,7 +43,6 @@
127 #include <plat/iic-core.h>
128 #include <plat/keypad-core.h>
129 #include <plat/tv-core.h>
130 -#include <plat/spi-core.h>
131 #include <plat/regs-serial.h>
132
133 #include "common.h"
134 @@ -197,8 +196,6 @@ void __init s5pv210_map_io(void)
135
136 /* setup TV devices */
137 s5p_hdmi_setname("s5pv210-hdmi");
138 -
139 - s3c64xx_spi_setname("s5pv210-spi");
140 }
141
142 void __init s5pv210_init_clocks(int xtal)
143 diff --git a/arch/arm/plat-samsung/include/plat/spi-core.h b/arch/arm/plat-samsung/include/plat/spi-core.h
144 deleted file mode 100644
145 index 0b9428a..0000000
146 --- a/arch/arm/plat-samsung/include/plat/spi-core.h
147 +++ /dev/null
148 @@ -1,30 +0,0 @@
149 -/*
150 - * Copyright (C) 2012 Heiko Stuebner <heiko@sntech.de>
151 - *
152 - * This program is free software; you can redistribute it and/or modify
153 - * it under the terms of the GNU General Public License version 2 as
154 - * published by the Free Software Foundation.
155 - */
156 -
157 -#ifndef __PLAT_S3C_SPI_CORE_H
158 -#define __PLAT_S3C_SPI_CORE_H
159 -
160 -/* These functions are only for use with the core support code, such as
161 - * the cpu specific initialisation code
162 - */
163 -
164 -/* re-define device name depending on support. */
165 -static inline void s3c64xx_spi_setname(char *name)
166 -{
167 -#ifdef CONFIG_S3C64XX_DEV_SPI0
168 - s3c64xx_device_spi0.name = name;
169 -#endif
170 -#ifdef CONFIG_S3C64XX_DEV_SPI1
171 - s3c64xx_device_spi1.name = name;
172 -#endif
173 -#ifdef CONFIG_S3C64XX_DEV_SPI2
174 - s3c64xx_device_spi2.name = name;
175 -#endif
176 -}
177 -
178 -#endif /* __PLAT_S3C_SPI_CORE_H */
179 diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
180 index b0b00d7..c82f06e 100644
181 --- a/drivers/block/floppy.c
182 +++ b/drivers/block/floppy.c
183 @@ -4161,6 +4161,7 @@ static int __init floppy_init(void)
184
185 disks[dr]->queue = blk_init_queue(do_fd_request, &floppy_lock);
186 if (!disks[dr]->queue) {
187 + put_disk(disks[dr]);
188 err = -ENOMEM;
189 goto out_put_disk;
190 }
191 diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c
192 index 031c6ad..1a3e2b9 100644
193 --- a/drivers/gpio/gpio-timberdale.c
194 +++ b/drivers/gpio/gpio-timberdale.c
195 @@ -116,7 +116,7 @@ static void timbgpio_irq_disable(struct irq_data *d)
196 unsigned long flags;
197
198 spin_lock_irqsave(&tgpio->lock, flags);
199 - tgpio->last_ier &= ~(1 << offset);
200 + tgpio->last_ier &= ~(1UL << offset);
201 iowrite32(tgpio->last_ier, tgpio->membase + TGPIO_IER);
202 spin_unlock_irqrestore(&tgpio->lock, flags);
203 }
204 @@ -128,7 +128,7 @@ static void timbgpio_irq_enable(struct irq_data *d)
205 unsigned long flags;
206
207 spin_lock_irqsave(&tgpio->lock, flags);
208 - tgpio->last_ier |= 1 << offset;
209 + tgpio->last_ier |= 1UL << offset;
210 iowrite32(tgpio->last_ier, tgpio->membase + TGPIO_IER);
211 spin_unlock_irqrestore(&tgpio->lock, flags);
212 }
213 diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
214 index 5a75510..112c16e 100644
215 --- a/drivers/gpio/gpiolib.c
216 +++ b/drivers/gpio/gpiolib.c
217 @@ -623,9 +623,11 @@ static ssize_t export_store(struct class *class,
218 */
219
220 status = gpio_request(gpio, "sysfs");
221 - if (status < 0)
222 + if (status < 0) {
223 + if (status == -EPROBE_DEFER)
224 + status = -ENODEV;
225 goto done;
226 -
227 + }
228 status = gpio_export(gpio, true);
229 if (status < 0)
230 gpio_free(gpio);
231 @@ -1191,8 +1193,10 @@ int gpio_request(unsigned gpio, const char *label)
232
233 spin_lock_irqsave(&gpio_lock, flags);
234
235 - if (!gpio_is_valid(gpio))
236 + if (!gpio_is_valid(gpio)) {
237 + status = -EINVAL;
238 goto done;
239 + }
240 desc = &gpio_desc[gpio];
241 chip = desc->chip;
242 if (chip == NULL)
243 diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c
244 index 4f2030b..05091c2 100644
245 --- a/drivers/gpu/drm/nouveau/nouveau_drv.c
246 +++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
247 @@ -186,11 +186,13 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state)
248 if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
249 return 0;
250
251 - NV_INFO(dev, "Disabling display...\n");
252 - nouveau_display_fini(dev);
253 + if (dev->mode_config.num_crtc) {
254 + NV_INFO(dev, "Disabling display...\n");
255 + nouveau_display_fini(dev);
256
257 - NV_INFO(dev, "Disabling fbcon...\n");
258 - nouveau_fbcon_set_suspend(dev, 1);
259 + NV_INFO(dev, "Disabling fbcon...\n");
260 + nouveau_fbcon_set_suspend(dev, 1);
261 + }
262
263 NV_INFO(dev, "Unpinning framebuffer(s)...\n");
264 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
265 @@ -363,10 +365,12 @@ nouveau_pci_resume(struct pci_dev *pdev)
266 NV_ERROR(dev, "Could not pin/map cursor.\n");
267 }
268
269 - nouveau_fbcon_set_suspend(dev, 0);
270 - nouveau_fbcon_zfill_all(dev);
271 + if (dev->mode_config.num_crtc) {
272 + nouveau_fbcon_set_suspend(dev, 0);
273 + nouveau_fbcon_zfill_all(dev);
274
275 - nouveau_display_init(dev);
276 + nouveau_display_init(dev);
277 + }
278
279 /* Force CLUT to get re-loaded during modeset */
280 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
281 @@ -468,9 +472,7 @@ static int __init nouveau_init(void)
282 #ifdef CONFIG_VGA_CONSOLE
283 if (vgacon_text_force())
284 nouveau_modeset = 0;
285 - else
286 #endif
287 - nouveau_modeset = 1;
288 }
289
290 if (!nouveau_modeset)
291 diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
292 index c2a8511..b096cf2 100644
293 --- a/drivers/gpu/drm/nouveau/nouveau_state.c
294 +++ b/drivers/gpu/drm/nouveau/nouveau_state.c
295 @@ -47,6 +47,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
296 {
297 struct drm_nouveau_private *dev_priv = dev->dev_private;
298 struct nouveau_engine *engine = &dev_priv->engine;
299 + u32 pclass = dev->pdev->class >> 8;
300
301 switch (dev_priv->chipset & 0xf0) {
302 case 0x00:
303 @@ -526,7 +527,8 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
304 }
305
306 /* headless mode */
307 - if (nouveau_modeset == 2) {
308 + if (nouveau_modeset == 2 ||
309 + (nouveau_modeset < 0 && pclass != PCI_CLASS_DISPLAY_VGA)) {
310 engine->display.early_init = nouveau_stub_init;
311 engine->display.late_takedown = nouveau_stub_takedown;
312 engine->display.create = nouveau_stub_init;
313 diff --git a/drivers/gpu/drm/nouveau/nv04_dac.c b/drivers/gpu/drm/nouveau/nv04_dac.c
314 index 8300266..f180dcf 100644
315 --- a/drivers/gpu/drm/nouveau/nv04_dac.c
316 +++ b/drivers/gpu/drm/nouveau/nv04_dac.c
317 @@ -210,7 +210,7 @@ out:
318 NVWriteVgaCrtc(dev, 0, NV_CIO_CR_MODE_INDEX, saved_cr_mode);
319
320 if (blue == 0x18) {
321 - NV_INFO(dev, "Load detected on head A\n");
322 + NV_DEBUG(dev, "Load detected on head A\n");
323 return connector_status_connected;
324 }
325
326 @@ -323,7 +323,7 @@ nv17_dac_detect(struct drm_encoder *encoder, struct drm_connector *connector)
327
328 if (nv17_dac_sample_load(encoder) &
329 NV_PRAMDAC_TEST_CONTROL_SENSEB_ALLHI) {
330 - NV_INFO(dev, "Load detected on output %c\n",
331 + NV_DEBUG(dev, "Load detected on output %c\n",
332 '@' + ffs(dcb->or));
333 return connector_status_connected;
334 } else {
335 @@ -398,7 +398,7 @@ static void nv04_dac_commit(struct drm_encoder *encoder)
336
337 helper->dpms(encoder, DRM_MODE_DPMS_ON);
338
339 - NV_INFO(dev, "Output %s is running on CRTC %d using output %c\n",
340 + NV_DEBUG(dev, "Output %s is running on CRTC %d using output %c\n",
341 drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base),
342 nv_crtc->index, '@' + ffs(nv_encoder->dcb->or));
343 }
344 @@ -447,7 +447,7 @@ static void nv04_dac_dpms(struct drm_encoder *encoder, int mode)
345 return;
346 nv_encoder->last_dpms = mode;
347
348 - NV_INFO(dev, "Setting dpms mode %d on vga encoder (output %d)\n",
349 + NV_DEBUG(dev, "Setting dpms mode %d on vga encoder (output %d)\n",
350 mode, nv_encoder->dcb->index);
351
352 nv04_dac_update_dacclk(encoder, mode == DRM_MODE_DPMS_ON);
353 diff --git a/drivers/gpu/drm/nouveau/nv04_dfp.c b/drivers/gpu/drm/nouveau/nv04_dfp.c
354 index 2258746..473f30a 100644
355 --- a/drivers/gpu/drm/nouveau/nv04_dfp.c
356 +++ b/drivers/gpu/drm/nouveau/nv04_dfp.c
357 @@ -476,7 +476,7 @@ static void nv04_dfp_commit(struct drm_encoder *encoder)
358
359 helper->dpms(encoder, DRM_MODE_DPMS_ON);
360
361 - NV_INFO(dev, "Output %s is running on CRTC %d using output %c\n",
362 + NV_DEBUG(dev, "Output %s is running on CRTC %d using output %c\n",
363 drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base),
364 nv_crtc->index, '@' + ffs(nv_encoder->dcb->or));
365 }
366 @@ -519,7 +519,7 @@ static void nv04_lvds_dpms(struct drm_encoder *encoder, int mode)
367 return;
368 nv_encoder->last_dpms = mode;
369
370 - NV_INFO(dev, "Setting dpms mode %d on lvds encoder (output %d)\n",
371 + NV_DEBUG(dev, "Setting dpms mode %d on lvds encoder (output %d)\n",
372 mode, nv_encoder->dcb->index);
373
374 if (was_powersaving && is_powersaving_dpms(mode))
375 @@ -564,7 +564,7 @@ static void nv04_tmds_dpms(struct drm_encoder *encoder, int mode)
376 return;
377 nv_encoder->last_dpms = mode;
378
379 - NV_INFO(dev, "Setting dpms mode %d on tmds encoder (output %d)\n",
380 + NV_DEBUG(dev, "Setting dpms mode %d on tmds encoder (output %d)\n",
381 mode, nv_encoder->dcb->index);
382
383 nv04_dfp_update_backlight(encoder, mode);
384 diff --git a/drivers/gpu/drm/nouveau/nv04_tv.c b/drivers/gpu/drm/nouveau/nv04_tv.c
385 index 3eb605d..4de1fbe 100644
386 --- a/drivers/gpu/drm/nouveau/nv04_tv.c
387 +++ b/drivers/gpu/drm/nouveau/nv04_tv.c
388 @@ -69,7 +69,7 @@ static void nv04_tv_dpms(struct drm_encoder *encoder, int mode)
389 struct nv04_mode_state *state = &dev_priv->mode_reg;
390 uint8_t crtc1A;
391
392 - NV_INFO(dev, "Setting dpms mode %d on TV encoder (output %d)\n",
393 + NV_DEBUG(dev, "Setting dpms mode %d on TV encoder (output %d)\n",
394 mode, nv_encoder->dcb->index);
395
396 state->pllsel &= ~(PLLSEL_TV_CRTC1_MASK | PLLSEL_TV_CRTC2_MASK);
397 @@ -162,7 +162,7 @@ static void nv04_tv_commit(struct drm_encoder *encoder)
398
399 helper->dpms(encoder, DRM_MODE_DPMS_ON);
400
401 - NV_INFO(dev, "Output %s is running on CRTC %d using output %c\n",
402 + NV_DEBUG(dev, "Output %s is running on CRTC %d using output %c\n",
403 drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base), nv_crtc->index,
404 '@' + ffs(nv_encoder->dcb->or));
405 }
406 diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c
407 index e5c699b..3899989 100644
408 --- a/drivers/hid/hid-microsoft.c
409 +++ b/drivers/hid/hid-microsoft.c
410 @@ -29,22 +29,30 @@
411 #define MS_RDESC 0x08
412 #define MS_NOGET 0x10
413 #define MS_DUPLICATE_USAGES 0x20
414 +#define MS_RDESC_3K 0x40
415
416 -/*
417 - * Microsoft Wireless Desktop Receiver (Model 1028) has
418 - * 'Usage Min/Max' where it ought to have 'Physical Min/Max'
419 - */
420 static __u8 *ms_report_fixup(struct hid_device *hdev, __u8 *rdesc,
421 unsigned int *rsize)
422 {
423 unsigned long quirks = (unsigned long)hid_get_drvdata(hdev);
424
425 + /*
426 + * Microsoft Wireless Desktop Receiver (Model 1028) has
427 + * 'Usage Min/Max' where it ought to have 'Physical Min/Max'
428 + */
429 if ((quirks & MS_RDESC) && *rsize == 571 && rdesc[557] == 0x19 &&
430 rdesc[559] == 0x29) {
431 hid_info(hdev, "fixing up Microsoft Wireless Receiver Model 1028 report descriptor\n");
432 rdesc[557] = 0x35;
433 rdesc[559] = 0x45;
434 }
435 + /* the same as above (s/usage/physical/) */
436 + if ((quirks & MS_RDESC_3K) && *rsize == 106 &&
437 + !memcmp((char []){ 0x19, 0x00, 0x29, 0xff },
438 + &rdesc[94], 4)) {
439 + rdesc[94] = 0x35;
440 + rdesc[96] = 0x45;
441 + }
442 return rdesc;
443 }
444
445 @@ -193,7 +201,7 @@ static const struct hid_device_id ms_devices[] = {
446 { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_USB),
447 .driver_data = MS_PRESENTER },
448 { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K),
449 - .driver_data = MS_ERGONOMY },
450 + .driver_data = MS_ERGONOMY | MS_RDESC_3K },
451 { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0),
452 .driver_data = MS_NOGET },
453 { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_MOUSE_4500),
454 diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
455 index 23904d2..df44509 100644
456 --- a/drivers/md/raid1.c
457 +++ b/drivers/md/raid1.c
458 @@ -2564,7 +2564,7 @@ static struct r1conf *setup_conf(struct mddev *mddev)
459 || disk_idx < 0)
460 continue;
461 if (test_bit(Replacement, &rdev->flags))
462 - disk = conf->mirrors + conf->raid_disks + disk_idx;
463 + disk = conf->mirrors + mddev->raid_disks + disk_idx;
464 else
465 disk = conf->mirrors + disk_idx;
466
467 diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
468 index e4d6dc2..d6ffd43 100644
469 --- a/drivers/net/wireless/b43/main.c
470 +++ b/drivers/net/wireless/b43/main.c
471 @@ -5430,6 +5430,8 @@ static void b43_ssb_remove(struct ssb_device *sdev)
472 cancel_work_sync(&wldev->restart_work);
473
474 B43_WARN_ON(!wl);
475 + if (!wldev->fw.ucode.data)
476 + return; /* NULL if firmware never loaded */
477 if (wl->current_dev == wldev) {
478 /* Restore the queues count before unregistering, because firmware detect
479 * might have modified it. Restoring is important, so the networking
480 diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
481 index d594460..69f3f7d 100644
482 --- a/drivers/target/target_core_transport.c
483 +++ b/drivers/target/target_core_transport.c
484 @@ -1748,7 +1748,6 @@ static void target_complete_tmr_failure(struct work_struct *work)
485
486 se_cmd->se_tmr_req->response = TMR_LUN_DOES_NOT_EXIST;
487 se_cmd->se_tfo->queue_tm_rsp(se_cmd);
488 - transport_generic_free_cmd(se_cmd, 0);
489 }
490
491 /**
492 diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
493 index 0ee374d..556cc82 100644
494 --- a/fs/ext4/ialloc.c
495 +++ b/fs/ext4/ialloc.c
496 @@ -697,6 +697,10 @@ repeat_in_this_group:
497 "inode=%lu", ino + 1);
498 continue;
499 }
500 + BUFFER_TRACE(inode_bitmap_bh, "get_write_access");
501 + err = ext4_journal_get_write_access(handle, inode_bitmap_bh);
502 + if (err)
503 + goto fail;
504 ext4_lock_group(sb, group);
505 ret2 = ext4_test_and_set_bit(ino, inode_bitmap_bh->b_data);
506 ext4_unlock_group(sb, group);
507 @@ -710,6 +714,11 @@ repeat_in_this_group:
508 goto out;
509
510 got:
511 + BUFFER_TRACE(inode_bitmap_bh, "call ext4_handle_dirty_metadata");
512 + err = ext4_handle_dirty_metadata(handle, NULL, inode_bitmap_bh);
513 + if (err)
514 + goto fail;
515 +
516 /* We may have to initialize the block bitmap if it isn't already */
517 if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_GDT_CSUM) &&
518 gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
519 @@ -742,11 +751,6 @@ got:
520 goto fail;
521 }
522
523 - BUFFER_TRACE(inode_bitmap_bh, "get_write_access");
524 - err = ext4_journal_get_write_access(handle, inode_bitmap_bh);
525 - if (err)
526 - goto fail;
527 -
528 BUFFER_TRACE(group_desc_bh, "get_write_access");
529 err = ext4_journal_get_write_access(handle, group_desc_bh);
530 if (err)
531 @@ -789,11 +793,6 @@ got:
532 ext4_unlock_group(sb, group);
533 }
534
535 - BUFFER_TRACE(inode_bitmap_bh, "call ext4_handle_dirty_metadata");
536 - err = ext4_handle_dirty_metadata(handle, NULL, inode_bitmap_bh);
537 - if (err)
538 - goto fail;
539 -
540 BUFFER_TRACE(group_desc_bh, "call ext4_handle_dirty_metadata");
541 err = ext4_handle_dirty_metadata(handle, NULL, group_desc_bh);
542 if (err)