kernel: fixing a potential deadlock in block2mtd for kernel 3.6/3.8/3.9
Signed-off-by: Alexander Couzens <lynxis@fe80.eu> SVN-Revision: 37842
This commit is contained in:
parent
f91d09cabb
commit
c75416292a
3 changed files with 6 additions and 3 deletions
|
@ -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 a new issue