* [PATCH] Btrfs: check return value for kthread_run() correctly
@ 2009-01-19 16:28 Qinghuang Feng
2009-01-21 14:56 ` Chris Mason
0 siblings, 1 reply; 2+ messages in thread
From: Qinghuang Feng @ 2009-01-19 16:28 UTC (permalink / raw)
To: chris.mason; +Cc: linux-kernel, linux-btrfs
kthread_run() returns the kthread or ERR_PTR(-ENOMEM), not NULL.
Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
---
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 81a3138..f718d25 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1740,13 +1740,13 @@ struct btrfs_root *open_ctree(struct super_block *sb,
fs_info->system_alloc_profile = fs_info->metadata_alloc_profile;
fs_info->cleaner_kthread = kthread_run(cleaner_kthread, tree_root,
"btrfs-cleaner");
- if (!fs_info->cleaner_kthread)
+ if (IS_ERR(fs_info->cleaner_kthread))
goto fail_csum_root;
fs_info->transaction_kthread = kthread_run(transaction_kthread,
tree_root,
"btrfs-transaction");
- if (!fs_info->transaction_kthread)
+ if (IS_ERR(fs_info->transaction_kthread))
goto fail_cleaner;
if (btrfs_super_log_root(disk_super) != 0) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Btrfs: check return value for kthread_run() correctly
2009-01-19 16:28 [PATCH] Btrfs: check return value for kthread_run() correctly Qinghuang Feng
@ 2009-01-21 14:56 ` Chris Mason
0 siblings, 0 replies; 2+ messages in thread
From: Chris Mason @ 2009-01-21 14:56 UTC (permalink / raw)
To: Qinghuang Feng; +Cc: linux-kernel, linux-btrfs
On Tue, 2009-01-20 at 00:28 +0800, Qinghuang Feng wrote:
> kthread_run() returns the kthread or ERR_PTR(-ENOMEM), not NULL.
>
Thanks, got it.
-chris
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-21 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-19 16:28 [PATCH] Btrfs: check return value for kthread_run() correctly Qinghuang Feng
2009-01-21 14:56 ` Chris Mason
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.