]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/gfs2/dir.c
[GFS2] Move part of gfs2_block_map into a separate function
[linux-2.6-omap-h63xx.git] / fs / gfs2 / dir.c
index 9949bb746a52e2b0975c466e1b2bd9fe6b963766..78c236fb34ec05fc2b8816d8c316a712ac223097 100644 (file)
@@ -1498,7 +1498,7 @@ struct inode *gfs2_dir_search(struct inode *dir, const struct qstr *name)
        dent = gfs2_dirent_search(dir, name, gfs2_dirent_find, &bh);
        if (dent) {
                if (IS_ERR(dent))
-                       return ERR_PTR(PTR_ERR(dent));
+                       return ERR_CAST(dent);
                inode = gfs2_inode_lookup(dir->i_sb, 
                                be16_to_cpu(dent->de_type),
                                be64_to_cpu(dent->de_inum.no_addr),
@@ -1876,7 +1876,7 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len,
        if (error)
                goto out;
 
-       error = gfs2_rindex_hold(sdp, &dip->i_alloc.al_ri_gh);
+       error = gfs2_rindex_hold(sdp, &dip->i_alloc->al_ri_gh);
        if (error)
                goto out_qs;
 
@@ -1894,7 +1894,7 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len,
                l_blocks++;
        }
 
-       gfs2_rlist_alloc(&rlist, LM_ST_EXCLUSIVE, 0);
+       gfs2_rlist_alloc(&rlist, LM_ST_EXCLUSIVE);
 
        for (x = 0; x < rlist.rl_rgrps; x++) {
                struct gfs2_rgrpd *rgd;
@@ -1949,7 +1949,7 @@ out_rg_gunlock:
        gfs2_glock_dq_m(rlist.rl_rgrps, rlist.rl_ghs);
 out_rlist:
        gfs2_rlist_free(&rlist);
-       gfs2_glock_dq_uninit(&dip->i_alloc.al_ri_gh);
+       gfs2_glock_dq_uninit(&dip->i_alloc->al_ri_gh);
 out_qs:
        gfs2_quota_unhold(dip);
 out: