* [PATCH] lmLogOpen() broken failure exit
@ 2011-06-05 18:22 Al Viro
2011-06-06 13:42 ` Dave Kleikamp
0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2011-06-05 18:22 UTC (permalink / raw)
To: shaggy; +Cc: linux-kernel
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>
---
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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] lmLogOpen() broken failure exit
2011-06-05 18:22 [PATCH] lmLogOpen() broken failure exit Al Viro
@ 2011-06-06 13:42 ` Dave Kleikamp
0 siblings, 0 replies; 2+ messages in thread
From: Dave Kleikamp @ 2011-06-06 13:42 UTC (permalink / raw)
To: Al Viro; +Cc: linux-kernel
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@zeniv.linux.org.uk>
Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
> ---
> 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;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-06 13:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-05 18:22 [PATCH] lmLogOpen() broken failure exit Al Viro
2011-06-06 13:42 ` Dave Kleikamp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).