Re: [PATCH] lmLogOpen() broken failure exit

From: Dave Kleikamp
Date: Mon Jun 06 2011 - 09:42:26 EST


Thanks, Al

On 06/05/2011 01:22 PM, Al Viro wrote:
> 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@xxxxxxxxxxxxxxxxxx>
Acked-by: Dave Kleikamp <dave.kleikamp@xxxxxxxxxx>

> ---
> 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;
> }
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/