From: Evgeniy Polyakov Date: Fri, 27 Mar 2009 12:04:30 +0000 (+0300) Subject: Staging: Pohmelfs: Add load balancing between network states with the same priority. X-Git-Tag: v2.6.30-rc3~58^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d43f3612818b13f44e12bfc2ad75b4b46628b3da;p=profile%2Fcommon%2Fkernel-common.git Staging: Pohmelfs: Add load balancing between network states with the same priority. Signed-off-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/pohmelfs/lock.c b/drivers/staging/pohmelfs/lock.c index ad4a185..22fef18 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, path_len = err; err = -ENOMEM; - t = netfs_trans_alloc(psb, path_len + sizeof(struct netfs_lock) + isize, 0, 0); + t = netfs_trans_alloc(psb, path_len + sizeof(struct netfs_lock) + isize, + NETFS_TRANS_SINGLE_DST, 0); if (!t) goto err_out_exit; diff --git a/drivers/staging/pohmelfs/trans.c b/drivers/staging/pohmelfs/trans.c index 168fc89..fef5f9b 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) continue; } + if (psb->active_state && (psb->active_state->state.ctl.prio >= st->ctl.prio)) + st = &psb->active_state->state; + err = netfs_trans_push(t, st); if (!err && (t->flags & NETFS_TRANS_SINGLE_DST)) break;