* [patch] Btrfs: fix error code in btrfs_init_test_fs()
@ 2014-06-20 19:20 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2014-06-20 19:20 UTC (permalink / raw)
To: Chris Mason; +Cc: Josef Bacik, Sasha Levin, linux-btrfs, kernel-janitors
We had intended to return a negative error code here, but we use the
wrong variable so it returns success.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c
index 9626252..8e7225f 100644
--- a/fs/btrfs/tests/btrfs-tests.c
+++ b/fs/btrfs/tests/btrfs-tests.c
@@ -65,7 +65,7 @@ int btrfs_init_test_fs(void)
if (IS_ERR(test_mnt)) {
printk(KERN_ERR "btrfs: cannot mount test file system\n");
unregister_filesystem(&test_type);
- return ret;
+ return PTR_ERR(test_mnt);
}
return 0;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [patch] Btrfs: fix error code in btrfs_init_test_fs()
@ 2014-06-20 19:20 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2014-06-20 19:20 UTC (permalink / raw)
To: Chris Mason; +Cc: Josef Bacik, Sasha Levin, linux-btrfs, kernel-janitors
We had intended to return a negative error code here, but we use the
wrong variable so it returns success.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c
index 9626252..8e7225f 100644
--- a/fs/btrfs/tests/btrfs-tests.c
+++ b/fs/btrfs/tests/btrfs-tests.c
@@ -65,7 +65,7 @@ int btrfs_init_test_fs(void)
if (IS_ERR(test_mnt)) {
printk(KERN_ERR "btrfs: cannot mount test file system\n");
unregister_filesystem(&test_type);
- return ret;
+ return PTR_ERR(test_mnt);
}
return 0;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch] Btrfs: fix error code in btrfs_init_test_fs()
2014-06-20 19:20 ` Dan Carpenter
@ 2014-06-23 1:30 ` Satoru Takeuchi
-1 siblings, 0 replies; 4+ messages in thread
From: Satoru Takeuchi @ 2014-06-23 1:30 UTC (permalink / raw)
To: Dan Carpenter, Chris Mason
Cc: Josef Bacik, Sasha Levin, linux-btrfs, kernel-janitors
(2014/06/21 4:20), Dan Carpenter wrote:
> We had intended to return a negative error code here, but we use the
> wrong variable so it returns success.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
>
> diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c
> index 9626252..8e7225f 100644
> --- a/fs/btrfs/tests/btrfs-tests.c
> +++ b/fs/btrfs/tests/btrfs-tests.c
> @@ -65,7 +65,7 @@ int btrfs_init_test_fs(void)
> if (IS_ERR(test_mnt)) {
> printk(KERN_ERR "btrfs: cannot mount test file system\n");
> unregister_filesystem(&test_type);
> - return ret;
> + return PTR_ERR(test_mnt);
> }
> return 0;
> }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] Btrfs: fix error code in btrfs_init_test_fs()
@ 2014-06-23 1:30 ` Satoru Takeuchi
0 siblings, 0 replies; 4+ messages in thread
From: Satoru Takeuchi @ 2014-06-23 1:30 UTC (permalink / raw)
To: Dan Carpenter, Chris Mason
Cc: Josef Bacik, Sasha Levin, linux-btrfs, kernel-janitors
(2014/06/21 4:20), Dan Carpenter wrote:
> We had intended to return a negative error code here, but we use the
> wrong variable so it returns success.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
>
> diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c
> index 9626252..8e7225f 100644
> --- a/fs/btrfs/tests/btrfs-tests.c
> +++ b/fs/btrfs/tests/btrfs-tests.c
> @@ -65,7 +65,7 @@ int btrfs_init_test_fs(void)
> if (IS_ERR(test_mnt)) {
> printk(KERN_ERR "btrfs: cannot mount test file system\n");
> unregister_filesystem(&test_type);
> - return ret;
> + return PTR_ERR(test_mnt);
> }
> return 0;
> }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-23 1:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-20 19:20 [patch] Btrfs: fix error code in btrfs_init_test_fs() Dan Carpenter
2014-06-20 19:20 ` Dan Carpenter
2014-06-23 1:30 ` Satoru Takeuchi
2014-06-23 1:30 ` Satoru Takeuchi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.