diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-05-28 00:58:48 +0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-07-22 13:37:47 +0400 |
commit | 2be18149d9d7ebfde7c3081d60f7c9d8d3b6f8c7 (patch) | |
tree | 2d6d602112049f4e6188d8ee3412168760e302ae /drivers/target/tcm_fc/tfc_conf.c | |
parent | a1fa3759583ef2379da6e2cc346ee9f99dfba309 (diff) | |
download | linux-2be18149d9d7ebfde7c3081d60f7c9d8d3b6f8c7.tar.xz |
tcm_fc: Convert to wake_up_process and schedule_timeout_interruptible
This patch converts ft_queue_cmd() to use wake_up_process() and
ft_thread() to use schedule_timeout_interruptible(MAX_SCHEDULE_TIMEOUT)
instead of wait_event_interruptible(). This fixes a potential race with
the wait_event_interruptible() conditional with qobj->queue_cnt in
ft_thread().
This patch also drops the unnecessary set_user_nice(current, -20) in
ft_thread(), and drops extra () around two if (!(acl)) conditionals in
tfc_conf.c.
Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/tcm_fc/tfc_conf.c')
-rw-r--r-- | drivers/target/tcm_fc/tfc_conf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c index 1cb3d345183f..ec9e40dc4514 100644 --- a/drivers/target/tcm_fc/tfc_conf.c +++ b/drivers/target/tcm_fc/tfc_conf.c @@ -223,7 +223,7 @@ static struct se_node_acl *ft_add_acl( return ERR_PTR(-EINVAL); acl = kzalloc(sizeof(struct ft_node_acl), GFP_KERNEL); - if (!(acl)) + if (!acl) return ERR_PTR(-ENOMEM); acl->node_auth.port_name = wwpn; @@ -280,7 +280,7 @@ struct se_node_acl *ft_tpg_alloc_fabric_acl(struct se_portal_group *se_tpg) struct ft_node_acl *acl; acl = kzalloc(sizeof(*acl), GFP_KERNEL); - if (!(acl)) { + if (!acl) { printk(KERN_ERR "Unable to allocate struct ft_node_acl\n"); return NULL; } |