aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeniy Polyakov <zbr@ioremap.net>2009-03-27 08:04:30 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-17 14:06:31 -0400
commitd43f3612818b13f44e12bfc2ad75b4b46628b3da (patch)
treeda228123b5ba79eebb77b25325b06bdd1e4d397b
parente0ca87391694dfacd01465d5c01c579c3b8b63e0 (diff)
Staging: Pohmelfs: Add load balancing between network states with the same priority.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/pohmelfs/lock.c3
-rw-r--r--drivers/staging/pohmelfs/trans.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/pohmelfs/lock.c b/drivers/staging/pohmelfs/lock.c
index ad4a18559bdd..22fef18cae90 100644
--- a/drivers/staging/pohmelfs/lock.c
+++ b/drivers/staging/pohmelfs/lock.c
@@ -41,7 +41,8 @@ static int pohmelfs_send_lock_trans(struct pohmelfs_inode *pi,
41 path_len = err; 41 path_len = err;
42 42
43 err = -ENOMEM; 43 err = -ENOMEM;
44 t = netfs_trans_alloc(psb, path_len + sizeof(struct netfs_lock) + isize, 0, 0); 44 t = netfs_trans_alloc(psb, path_len + sizeof(struct netfs_lock) + isize,
45 NETFS_TRANS_SINGLE_DST, 0);
45 if (!t) 46 if (!t)
46 goto err_out_exit; 47 goto err_out_exit;
47 48
diff --git a/drivers/staging/pohmelfs/trans.c b/drivers/staging/pohmelfs/trans.c
index 168fc8998c32..fef5f9bd6920 100644
--- a/drivers/staging/pohmelfs/trans.c
+++ b/drivers/staging/pohmelfs/trans.c
@@ -467,6 +467,9 @@ int netfs_trans_finish_send(struct netfs_trans *t, struct pohmelfs_sb *psb)
467 continue; 467 continue;
468 } 468 }
469 469
470 if (psb->active_state && (psb->active_state->state.ctl.prio >= st->ctl.prio))
471 st = &psb->active_state->state;
472
470 err = netfs_trans_push(t, st); 473 err = netfs_trans_push(t, st);
471 if (!err && (t->flags & NETFS_TRANS_SINGLE_DST)) 474 if (!err && (t->flags & NETFS_TRANS_SINGLE_DST))
472 break; 475 break;