aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 739ea45a9d10..e569bf5d6cf0 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -2974,6 +2974,7 @@ xfs_iflush_cluster(
2974 xfs_mount_t *mp = ip->i_mount; 2974 xfs_mount_t *mp = ip->i_mount;
2975 xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino); 2975 xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino);
2976 unsigned long first_index, mask; 2976 unsigned long first_index, mask;
2977 unsigned long inodes_per_cluster;
2977 int ilist_size; 2978 int ilist_size;
2978 xfs_inode_t **ilist; 2979 xfs_inode_t **ilist;
2979 xfs_inode_t *iq; 2980 xfs_inode_t *iq;
@@ -2985,7 +2986,8 @@ xfs_iflush_cluster(
2985 ASSERT(pag->pagi_inodeok); 2986 ASSERT(pag->pagi_inodeok);
2986 ASSERT(pag->pag_ici_init); 2987 ASSERT(pag->pag_ici_init);
2987 2988
2988 ilist_size = XFS_INODE_CLUSTER_SIZE(mp) * sizeof(xfs_inode_t *); 2989 inodes_per_cluster = XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog;
2990 ilist_size = inodes_per_cluster * sizeof(xfs_inode_t *);
2989 ilist = kmem_alloc(ilist_size, KM_MAYFAIL|KM_NOFS); 2991 ilist = kmem_alloc(ilist_size, KM_MAYFAIL|KM_NOFS);
2990 if (!ilist) 2992 if (!ilist)
2991 return 0; 2993 return 0;
@@ -2995,8 +2997,7 @@ xfs_iflush_cluster(
2995 read_lock(&pag->pag_ici_lock); 2997 read_lock(&pag->pag_ici_lock);
2996 /* really need a gang lookup range call here */ 2998 /* really need a gang lookup range call here */
2997 nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, (void**)ilist, 2999 nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, (void**)ilist,
2998 first_index, 3000 first_index, inodes_per_cluster);
2999 XFS_INODE_CLUSTER_SIZE(mp));
3000 if (nr_found == 0) 3001 if (nr_found == 0)
3001 goto out_free; 3002 goto out_free;
3002 3003