lmLogOpen() broken failure exit
authorAl Viro <viro@ZenIV.linux.org.uk>
Sun, 5 Jun 2011 18:22:56 +0000 (19:22 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 7 Jun 2011 12:50:59 +0000 (08:50 -0400)
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 <viro@zeniv.linux.org.uk>
Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
fs/jfs/jfs_logmgr.c

index 278e3fb40b71e259b3eab7492fcebbd2c2a033e2..583636f745e59dbe7e66e1b3871496ac3b29a63d 100644 (file)
@@ -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;
        }