From fe1bdedc6c16adedc6fd3636185ea91596b1d6eb Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Tue, 18 Apr 2006 10:09:15 -0400 Subject: [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 --- fs/gfs2/ops_inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/gfs2/ops_inode.c') diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 1e2b709711a..62a12a59d91 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c @@ -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 + -- cgit v1.2.3