From: Al Viro Date: Sun, 5 Jun 2011 18:22:56 +0000 (+0100) Subject: lmLogOpen() broken failure exit X-Git-Tag: v3.0-rc3~54^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9054760ff585a7fa436599990b63a585ae89ff4d;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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 Acked-by: Dave Kleikamp --- diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 278e3fb..583636f 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c @@ -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; }