lmLogOpen() broken failure exit
PATCH 1/1 lmLogOpen() broken failure exit
Callers of lmLogOpen() expect it to return -E... on failure exits, which is what it returns, except for the case of blkdev_get_by_dev() failure. It that case lmLogOpen() return the error with the wrong sign...
Signed-off-by Al Viro <[email protected]>
---
fs/jfs/jfs_logmgr.c +1 -1
@@ -1123,7 +1123,7 @@ int lmLogOpen(struct super_block *sb) bdev =blkdev_get_by_dev (sbi->logdev,FMODE_READ |FMODE_WRITE |FMODE_EXCL , log);if (IS_ERR (bdev)) { - rc = -PTR_ERR (bdev); + rc =PTR_ERR (bdev); goto free; }
Thanks, Al
Quoted 5 lines · Al Viro
Callers of
lmLogOpen()expect it to return -E... on failure exits, which is what it returns, except for the case ofblkdev_get_by_dev()failure. It that caselmLogOpen()return the error with the wrong sign...Signed-off-by Al Viro <[email protected]>
Acked-by Dave Kleikamp <[email protected]>
Quoted 14 lines
---
fs/jfs/jfs_logmgr.c +1
-1@@ -1123,7 +1123,7 @@ int lmLogOpen(struct super_block *sb) bdev =blkdev_get_by_dev (sbi->logdev,FMODE_READ |FMODE_WRITE |FMODE_EXCL , log);if (IS_ERR (bdev)) { - rc = -PTR_ERR (bdev); + rc =PTR_ERR (bdev); goto free; }