[GFS2] Use vmalloc() in dir code

When allocating memory to sort directory entries, use vmalloc()
rather than kmalloc() since for larger directories, the required
size can easily be graeter than the 128k maximum of kmalloc().

Also adding the first steps towards getting the AOP_TRUNCATED_PAGE
return code get in the glock code by flagging all places where we
request a glock and we are holding a page lock.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
Steven Whitehouse
2006-04-18 10:09:15 -04:00
parent 4d8012b60e
commit fe1bdedc6c
8 changed files with 12 additions and 10 deletions

View File

@ -742,8 +742,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
if (error)
goto out_gunlock_q;
error = gfs2_trans_begin(sdp,
sdp->sd_max_dirres +
error = gfs2_trans_begin(sdp, sdp->sd_max_dirres +
al->al_rgd->rd_ri.ri_length +
4 * RES_DINODE + 4 * RES_LEAF +
RES_UNLINKED + RES_STATFS +