GFS2: combine gfs2_alloc_block and gfs2_alloc_di
[firefly-linux-kernel-4.4.55.git] / fs / gfs2 / bmap.c
index 41d494d7970918644f338411d2fc523c89a641e1..b69235ba2251c28cf608abce1ee46e4492ceff40 100644 (file)
@@ -133,7 +133,7 @@ int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page)
                   and write it out to disk */
 
                unsigned int n = 1;
-               error = gfs2_alloc_block(ip, &block, &n);
+               error = gfs2_alloc_block(ip, &block, &n, 0, NULL);
                if (error)
                        goto out_brelse;
                if (isdir) {
@@ -503,7 +503,7 @@ static int gfs2_bmap_alloc(struct inode *inode, const sector_t lblock,
        do {
                int error;
                n = blks - alloced;
-               error = gfs2_alloc_block(ip, &bn, &n);
+               error = gfs2_alloc_block(ip, &bn, &n, 0, NULL);
                if (error)
                        return error;
                alloced += n;
@@ -743,9 +743,6 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh,
        else if (ip->i_depth)
                revokes = sdp->sd_inptrs;
 
-       if (error)
-               return error;
-
        memset(&rlist, 0, sizeof(struct gfs2_rgrp_list));
        bstart = 0;
        blen = 0;