kernel: fixing a potential deadlock in block2mtd for kernel 3.6/3.8/3.9
Signed-off-by: Alexander Couzens <lynxis@fe80.eu> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37842 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
5a6f443323
commit
6007ed4fa8
|
@ -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;
|
||||
+ }
|
||||
|
||||
|
|
|
@ -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;
|
||||
+ }
|
||||
|
||||
|
|
|
@ -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;
|
||||
+ }
|
||||
|
||||
|
|
Loading…
Reference in New Issue