Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294612
b: refs/heads/master
c: a79bf2d
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Ben Myers committed Feb 23, 2012
1 parent 3f4a359 commit e097cc3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c303c5b8c3b8eace41c4fba26205b50c0f8e4ca0
refs/heads/master: a79bf2d75b8f96bcdb6714138cd53cb3c358669c
24 changes: 14 additions & 10 deletions trunk/fs/xfs/xfs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,18 @@ xlog_grant_head_init(
spin_lock_init(&head->lock);
}

STATIC void
xlog_grant_head_wake_all(
struct xlog_grant_head *head)
{
struct xlog_ticket *tic;

spin_lock(&head->lock);
list_for_each_entry(tic, &head->waiters, t_queue)
wake_up_process(tic->t_task);
spin_unlock(&head->lock);
}

STATIC bool
xlog_reserveq_wake(
struct log *log,
Expand Down Expand Up @@ -3557,7 +3569,6 @@ xfs_log_force_umount(
struct xfs_mount *mp,
int logerror)
{
xlog_ticket_t *tic;
xlog_t *log;
int retval;

Expand Down Expand Up @@ -3625,15 +3636,8 @@ xfs_log_force_umount(
* we don't enqueue anything once the SHUTDOWN flag is set, and this
* action is protected by the grant locks.
*/
spin_lock(&log->l_reserve_head.lock);
list_for_each_entry(tic, &log->l_reserve_head.waiters, t_queue)
wake_up_process(tic->t_task);
spin_unlock(&log->l_reserve_head.lock);

spin_lock(&log->l_write_head.lock);
list_for_each_entry(tic, &log->l_write_head.waiters, t_queue)
wake_up_process(tic->t_task);
spin_unlock(&log->l_write_head.lock);
xlog_grant_head_wake_all(&log->l_reserve_head);
xlog_grant_head_wake_all(&log->l_write_head);

if (!(log->l_iclog->ic_state & XLOG_STATE_IOERROR)) {
ASSERT(!logerror);
Expand Down

0 comments on commit e097cc3

Please sign in to comment.