diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-06-16 11:17:50 +0200 | 
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-06-16 11:17:50 +0200 | 
| commit | 1791a78c0b10fe548bf08a2ed7f84a4ea1385430 (patch) | |
| tree | 3bc3e71a900a364aaaaf28d553ce44e5dc27092b /fs/xfs/xfs_inode.c | |
| parent | bf07dc864902b3e788de5ab50dc62d5677da90f2 (diff) | |
| parent | 066519068ad2fbe98c7f45552b1f592903a9c8c8 (diff) | |
Merge branch 'linus' into x86/cleanups
Diffstat (limited to 'fs/xfs/xfs_inode.c')
| -rw-r--r-- | fs/xfs/xfs_inode.c | 9 | 
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index cf0bb9c1d621..e569bf5d6cf0 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -2974,6 +2974,7 @@ xfs_iflush_cluster(  	xfs_mount_t		*mp = ip->i_mount;  	xfs_perag_t		*pag = xfs_get_perag(mp, ip->i_ino);  	unsigned long		first_index, mask; +	unsigned long		inodes_per_cluster;  	int			ilist_size;  	xfs_inode_t		**ilist;  	xfs_inode_t		*iq; @@ -2985,8 +2986,9 @@ xfs_iflush_cluster(  	ASSERT(pag->pagi_inodeok);  	ASSERT(pag->pag_ici_init); -	ilist_size = XFS_INODE_CLUSTER_SIZE(mp) * sizeof(xfs_inode_t *); -	ilist = kmem_alloc(ilist_size, KM_MAYFAIL); +	inodes_per_cluster = XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog; +	ilist_size = inodes_per_cluster * sizeof(xfs_inode_t *); +	ilist = kmem_alloc(ilist_size, KM_MAYFAIL|KM_NOFS);  	if (!ilist)  		return 0; @@ -2995,8 +2997,7 @@ xfs_iflush_cluster(  	read_lock(&pag->pag_ici_lock);  	/* really need a gang lookup range call here */  	nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, (void**)ilist, -					first_index, -					XFS_INODE_CLUSTER_SIZE(mp)); +					first_index, inodes_per_cluster);  	if (nr_found == 0)  		goto out_free;  | 
