]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - fs/gfs2/inode.c
GFS2: Make resource groups "append only" during life of fs
[mirror_ubuntu-jammy-kernel.git] / fs / gfs2 / inode.c
index 2af69056a9fd0729683525766a771d0900320445..29703dd97dc99f53d1036e65642dde90837ccf61 100644 (file)
@@ -1041,13 +1041,8 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry)
        struct buffer_head *bh;
        struct gfs2_holder ghs[3];
        struct gfs2_rgrpd *rgd;
-       struct gfs2_holder ri_gh;
        int error;
 
-       error = gfs2_rindex_hold(sdp, &ri_gh);
-       if (error)
-               return error;
-
        gfs2_holder_init(dip->i_gl, LM_ST_EXCLUSIVE, 0, ghs);
        gfs2_holder_init(ip->i_gl,  LM_ST_EXCLUSIVE, 0, ghs + 1);
 
@@ -1104,7 +1099,6 @@ out_child:
        gfs2_glock_dq(ghs);
 out_parent:
        gfs2_holder_uninit(ghs);
-       gfs2_glock_dq_uninit(&ri_gh);
        return error;
 }
 
@@ -1222,7 +1216,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
        struct gfs2_inode *ip = GFS2_I(odentry->d_inode);
        struct gfs2_inode *nip = NULL;
        struct gfs2_sbd *sdp = GFS2_SB(odir);
-       struct gfs2_holder ghs[5], r_gh = { .gh_gl = NULL, }, ri_gh;
+       struct gfs2_holder ghs[5], r_gh = { .gh_gl = NULL, };
        struct gfs2_rgrpd *nrgd;
        unsigned int num_gh;
        int dir_rename = 0;
@@ -1236,10 +1230,6 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
                        return 0;
        }
 
-       error = gfs2_rindex_hold(sdp, &ri_gh);
-       if (error)
-               return error;
-
        if (odip != ndip) {
                error = gfs2_glock_nq_init(sdp->sd_rename_gl, LM_ST_EXCLUSIVE,
                                           0, &r_gh);
@@ -1376,7 +1366,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
 
                al->al_requested = sdp->sd_max_dirres;
 
-               error = gfs2_inplace_reserve_ri(ndip);
+               error = gfs2_inplace_reserve(ndip);
                if (error)
                        goto out_gunlock_q;
 
@@ -1447,7 +1437,6 @@ out_gunlock_r:
        if (r_gh.gh_gl)
                gfs2_glock_dq_uninit(&r_gh);
 out:
-       gfs2_glock_dq_uninit(&ri_gh);
        return error;
 }