xfs_agino_t pagi_count; /* number of allocated inodes */
int pagb_count; /* pagb slots in use */
#ifdef __KERNEL__
- lock_t pagb_lock; /* lock for pagb_list */
+ spinlock_t pagb_lock; /* lock for pagb_list */
#endif
xfs_perag_busy_t *pagb_list; /* unstable blocks */
atomic_t pagf_fstrms; /* # of filestreams active in this AG */
xfs_mount_t *mp;
xfs_perag_busy_t *bsy;
int n;
- SPLDECL(s);
mp = tp->t_mountp;
- s = mutex_spinlock(&mp->m_perag[agno].pagb_lock);
+ spin_lock(&mp->m_perag[agno].pagb_lock);
/* search pagb_list for an open slot */
for (bsy = mp->m_perag[agno].pagb_list, n = 0;
xfs_trans_set_sync(tp);
}
- mutex_spinunlock(&mp->m_perag[agno].pagb_lock, s);
+ spin_unlock(&mp->m_perag[agno].pagb_lock);
}
void
{
xfs_mount_t *mp;
xfs_perag_busy_t *list;
- SPLDECL(s);
mp = tp->t_mountp;
- s = mutex_spinlock(&mp->m_perag[agno].pagb_lock);
+ spin_lock(&mp->m_perag[agno].pagb_lock);
list = mp->m_perag[agno].pagb_list;
ASSERT(idx < XFS_PAGB_NUM_SLOTS);
TRACE_UNBUSY("xfs_alloc_clear_busy", "missing", agno, idx, tp);
}
- mutex_spinunlock(&mp->m_perag[agno].pagb_lock, s);
+ spin_unlock(&mp->m_perag[agno].pagb_lock);
}
xfs_agblock_t uend, bend;
xfs_lsn_t lsn;
int cnt;
- SPLDECL(s);
mp = tp->t_mountp;
- s = mutex_spinlock(&mp->m_perag[agno].pagb_lock);
+ spin_lock(&mp->m_perag[agno].pagb_lock);
cnt = mp->m_perag[agno].pagb_count;
uend = bno + len - 1;
if (cnt) {
TRACE_BUSYSEARCH("xfs_alloc_search_busy", "found", agno, bno, len, n, tp);
lsn = bsy->busy_tp->t_commit_lsn;
- mutex_spinunlock(&mp->m_perag[agno].pagb_lock, s);
+ spin_unlock(&mp->m_perag[agno].pagb_lock);
xfs_log_force(mp, lsn, XFS_LOG_FORCE|XFS_LOG_SYNC);
} else {
TRACE_BUSYSEARCH("xfs_alloc_search_busy", "not-found", agno, bno, len, n, tp);
n = -1;
- mutex_spinunlock(&mp->m_perag[agno].pagb_lock, s);
+ spin_unlock(&mp->m_perag[agno].pagb_lock);
}
return n;