kernel: fixing a potential deadlock in block2mtd for kernel 3.6/3.8/3.9
authorFelix Fietkau <nbd@openwrt.org>
Mon, 26 Aug 2013 17:47:14 +0000 (17:47 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 26 Aug 2013 17:47:14 +0000 (17:47 +0000)
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
SVN-Revision: 37842

target/linux/generic/patches-3.6/441-block2mtd_refresh.patch
target/linux/generic/patches-3.8/441-block2mtd_refresh.patch
target/linux/generic/patches-3.9/441-block2mtd_refresh.patch

index d54e52900e4e01343fed6e4565fa026f5624e225..7f8a1f1233585306a4034ee95410cc338b11eb6f 100644 (file)
@@ -53,8 +53,9 @@
  
                page = page_read(dev->blkdev->bd_inode->i_mapping, index);
 -              if (IS_ERR(page))
+-                      return PTR_ERR(page);
 +              if (IS_ERR(page)) {
-                       return PTR_ERR(page);
++                      err = PTR_ERR(page);
 +                      goto done;
 +              }
  
index 11b743db2ec61c34783840d0680a61f54ee8e5a3..b2b02229e1721f56369b722e611d5ce72134cfe0 100644 (file)
@@ -53,8 +53,9 @@
  
                page = page_read(dev->blkdev->bd_inode->i_mapping, index);
 -              if (IS_ERR(page))
+-                      return PTR_ERR(page);
 +              if (IS_ERR(page)) {
-                       return PTR_ERR(page);
++                      err = PTR_ERR(page);
 +                      goto done;
 +              }
  
index 11b743db2ec61c34783840d0680a61f54ee8e5a3..b2b02229e1721f56369b722e611d5ce72134cfe0 100644 (file)
@@ -53,8 +53,9 @@
  
                page = page_read(dev->blkdev->bd_inode->i_mapping, index);
 -              if (IS_ERR(page))
+-                      return PTR_ERR(page);
 +              if (IS_ERR(page)) {
-                       return PTR_ERR(page);
++                      err = PTR_ERR(page);
 +                      goto done;
 +              }