Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294611
b: refs/heads/master
c: c303c5b
h: refs/heads/master
i:
  294609: 9116e71
  294607: 238c91b
v: v3
  • Loading branch information
Christoph Hellwig authored and Ben Myers committed Feb 23, 2012
1 parent 6570522 commit 3f4a359
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 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: 28496968a6ac37c8b8c44b5156e633c581bb8378
refs/heads/master: c303c5b8c3b8eace41c4fba26205b50c0f8e4ca0
18 changes: 12 additions & 6 deletions trunk/fs/xfs/xfs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@ xlog_grant_add_space(
} while (head_val != old);
}

STATIC void
xlog_grant_head_init(
struct xlog_grant_head *head)
{
xlog_assign_grant_head(&head->grant, 1, 0);
INIT_LIST_HEAD(&head->waiters);
spin_lock_init(&head->lock);
}

STATIC bool
xlog_reserveq_wake(
struct log *log,
Expand Down Expand Up @@ -1070,12 +1079,9 @@ xlog_alloc_log(xfs_mount_t *mp,
xlog_assign_atomic_lsn(&log->l_tail_lsn, 1, 0);
xlog_assign_atomic_lsn(&log->l_last_sync_lsn, 1, 0);
log->l_curr_cycle = 1; /* 0 is bad since this is initial value */
xlog_assign_grant_head(&log->l_reserve_head.grant, 1, 0);
xlog_assign_grant_head(&log->l_write_head.grant, 1, 0);
INIT_LIST_HEAD(&log->l_reserve_head.waiters);
INIT_LIST_HEAD(&log->l_write_head.waiters);
spin_lock_init(&log->l_reserve_head.lock);
spin_lock_init(&log->l_write_head.lock);

xlog_grant_head_init(&log->l_reserve_head);
xlog_grant_head_init(&log->l_write_head);

error = EFSCORRUPTED;
if (xfs_sb_version_hassector(&mp->m_sb)) {
Expand Down

0 comments on commit 3f4a359

Please sign in to comment.