diff options
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index a6d35aee93b2..e7930680fff4 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -2205,7 +2205,6 @@ xfs_ifree_cluster( | |||
2205 | xfs_inode_log_item_t *iip; | 2205 | xfs_inode_log_item_t *iip; |
2206 | xfs_log_item_t *lip; | 2206 | xfs_log_item_t *lip; |
2207 | xfs_perag_t *pag = xfs_get_perag(mp, inum); | 2207 | xfs_perag_t *pag = xfs_get_perag(mp, inum); |
2208 | SPLDECL(s); | ||
2209 | 2208 | ||
2210 | if (mp->m_sb.sb_blocksize >= XFS_INODE_CLUSTER_SIZE(mp)) { | 2209 | if (mp->m_sb.sb_blocksize >= XFS_INODE_CLUSTER_SIZE(mp)) { |
2211 | blks_per_cluster = 1; | 2210 | blks_per_cluster = 1; |
@@ -2307,9 +2306,9 @@ xfs_ifree_cluster( | |||
2307 | iip = (xfs_inode_log_item_t *)lip; | 2306 | iip = (xfs_inode_log_item_t *)lip; |
2308 | ASSERT(iip->ili_logged == 1); | 2307 | ASSERT(iip->ili_logged == 1); |
2309 | lip->li_cb = (void(*)(xfs_buf_t*,xfs_log_item_t*)) xfs_istale_done; | 2308 | lip->li_cb = (void(*)(xfs_buf_t*,xfs_log_item_t*)) xfs_istale_done; |
2310 | AIL_LOCK(mp,s); | 2309 | spin_lock(&mp->m_ail_lock); |
2311 | iip->ili_flush_lsn = iip->ili_item.li_lsn; | 2310 | iip->ili_flush_lsn = iip->ili_item.li_lsn; |
2312 | AIL_UNLOCK(mp, s); | 2311 | spin_unlock(&mp->m_ail_lock); |
2313 | xfs_iflags_set(iip->ili_inode, XFS_ISTALE); | 2312 | xfs_iflags_set(iip->ili_inode, XFS_ISTALE); |
2314 | pre_flushed++; | 2313 | pre_flushed++; |
2315 | } | 2314 | } |
@@ -2330,9 +2329,9 @@ xfs_ifree_cluster( | |||
2330 | iip->ili_last_fields = iip->ili_format.ilf_fields; | 2329 | iip->ili_last_fields = iip->ili_format.ilf_fields; |
2331 | iip->ili_format.ilf_fields = 0; | 2330 | iip->ili_format.ilf_fields = 0; |
2332 | iip->ili_logged = 1; | 2331 | iip->ili_logged = 1; |
2333 | AIL_LOCK(mp,s); | 2332 | spin_lock(&mp->m_ail_lock); |
2334 | iip->ili_flush_lsn = iip->ili_item.li_lsn; | 2333 | iip->ili_flush_lsn = iip->ili_item.li_lsn; |
2335 | AIL_UNLOCK(mp, s); | 2334 | spin_unlock(&mp->m_ail_lock); |
2336 | 2335 | ||
2337 | xfs_buf_attach_iodone(bp, | 2336 | xfs_buf_attach_iodone(bp, |
2338 | (void(*)(xfs_buf_t*,xfs_log_item_t*)) | 2337 | (void(*)(xfs_buf_t*,xfs_log_item_t*)) |
@@ -2731,7 +2730,6 @@ void | |||
2731 | xfs_idestroy( | 2730 | xfs_idestroy( |
2732 | xfs_inode_t *ip) | 2731 | xfs_inode_t *ip) |
2733 | { | 2732 | { |
2734 | |||
2735 | switch (ip->i_d.di_mode & S_IFMT) { | 2733 | switch (ip->i_d.di_mode & S_IFMT) { |
2736 | case S_IFREG: | 2734 | case S_IFREG: |
2737 | case S_IFDIR: | 2735 | case S_IFDIR: |
@@ -2771,16 +2769,15 @@ xfs_idestroy( | |||
2771 | */ | 2769 | */ |
2772 | xfs_mount_t *mp = ip->i_mount; | 2770 | xfs_mount_t *mp = ip->i_mount; |
2773 | xfs_log_item_t *lip = &ip->i_itemp->ili_item; | 2771 | xfs_log_item_t *lip = &ip->i_itemp->ili_item; |
2774 | int s; | ||
2775 | 2772 | ||
2776 | ASSERT(((lip->li_flags & XFS_LI_IN_AIL) == 0) || | 2773 | ASSERT(((lip->li_flags & XFS_LI_IN_AIL) == 0) || |
2777 | XFS_FORCED_SHUTDOWN(ip->i_mount)); | 2774 | XFS_FORCED_SHUTDOWN(ip->i_mount)); |
2778 | if (lip->li_flags & XFS_LI_IN_AIL) { | 2775 | if (lip->li_flags & XFS_LI_IN_AIL) { |
2779 | AIL_LOCK(mp, s); | 2776 | spin_lock(&mp->m_ail_lock); |
2780 | if (lip->li_flags & XFS_LI_IN_AIL) | 2777 | if (lip->li_flags & XFS_LI_IN_AIL) |
2781 | xfs_trans_delete_ail(mp, lip, s); | 2778 | xfs_trans_delete_ail(mp, lip); |
2782 | else | 2779 | else |
2783 | AIL_UNLOCK(mp, s); | 2780 | spin_unlock(&mp->m_ail_lock); |
2784 | } | 2781 | } |
2785 | xfs_inode_item_destroy(ip); | 2782 | xfs_inode_item_destroy(ip); |
2786 | } | 2783 | } |
@@ -3334,7 +3331,6 @@ xfs_iflush_int( | |||
3334 | #ifdef XFS_TRANS_DEBUG | 3331 | #ifdef XFS_TRANS_DEBUG |
3335 | int first; | 3332 | int first; |
3336 | #endif | 3333 | #endif |
3337 | SPLDECL(s); | ||
3338 | 3334 | ||
3339 | ASSERT(ismrlocked(&ip->i_lock, MR_UPDATE|MR_ACCESS)); | 3335 | ASSERT(ismrlocked(&ip->i_lock, MR_UPDATE|MR_ACCESS)); |
3340 | ASSERT(issemalocked(&(ip->i_flock))); | 3336 | ASSERT(issemalocked(&(ip->i_flock))); |
@@ -3529,9 +3525,9 @@ xfs_iflush_int( | |||
3529 | iip->ili_logged = 1; | 3525 | iip->ili_logged = 1; |
3530 | 3526 | ||
3531 | ASSERT(sizeof(xfs_lsn_t) == 8); /* don't lock if it shrinks */ | 3527 | ASSERT(sizeof(xfs_lsn_t) == 8); /* don't lock if it shrinks */ |
3532 | AIL_LOCK(mp,s); | 3528 | spin_lock(&mp->m_ail_lock); |
3533 | iip->ili_flush_lsn = iip->ili_item.li_lsn; | 3529 | iip->ili_flush_lsn = iip->ili_item.li_lsn; |
3534 | AIL_UNLOCK(mp, s); | 3530 | spin_unlock(&mp->m_ail_lock); |
3535 | 3531 | ||
3536 | /* | 3532 | /* |
3537 | * Attach the function xfs_iflush_done to the inode's | 3533 | * Attach the function xfs_iflush_done to the inode's |