Skip to contentSkip to conversation

lmLogOpen() broken failure exit

PATCH In review Al Viro 2 participants 2 messages Jun 5, 2011 – Jun 6, 2011 JFS filesystem

lore
Share & tools
lore

Al Viro

author
#0 lore raw

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...

---

fs/jfs/jfs_logmgr.c +1 -1
index 278e3fb..583636f 100644
@@ -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;
 	}
 
Acked-by on v1 1/1
#1 lore raw

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 of blkdev_get_by_dev() failure. It that case lmLogOpen() return the error with the wrong sign...

Quoted 14 lines

---

fs/jfs/jfs_logmgr.c +1 -1
index 278e3fb..583636f 100644
@@ -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;
 	}