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-a3cf2f4a3e73
master
Felix Fietkau 2013-08-26 17:47:14 +00:00
parent 5a6f443323
commit 6007ed4fa8
3 changed files with 6 additions and 3 deletions

View 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;
+ }

View 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;
+ }

View 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;
+ }