Skip to content

Commit

Permalink
Staging: Pohmelfs: Add load balancing between network states with the…
Browse files Browse the repository at this point in the history
… same priority.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Evgeniy Polyakov authored and Greg Kroah-Hartman committed Apr 17, 2009
1 parent e0ca873 commit d43f361
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/pohmelfs/lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 3 additions & 0 deletions drivers/staging/pohmelfs/trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d43f361

Please sign in to comment.