]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - fs/gfs2/ops_fstype.c
[GFS2] Set d_ops for root inode
[mirror_ubuntu-jammy-kernel.git] / fs / gfs2 / ops_fstype.c
index 4538a1e621e885bbfe1e1ffeef94f16483972bcb..f252723b37da1a21137e2a0cd7c2fb1d76bb4d5b 100644 (file)
@@ -40,6 +40,8 @@
 #define DO 0
 #define UNDO 1
 
+extern struct dentry_operations gfs2_dops;
+
 static struct gfs2_sbd *init_sbd(struct super_block *sb)
 {
        struct gfs2_sbd *sdp;
@@ -223,7 +225,7 @@ static int init_locking(struct gfs2_sbd *sdp, struct gfs2_holder *mount_gh,
        error = gfs2_glock_nq_num(sdp,
                                  GFS2_LIVE_LOCK, &gfs2_nondisk_glops,
                                  LM_ST_SHARED,
-                                 LM_FLAG_NOEXP | GL_EXACT | GL_NEVER_RECURSE,
+                                 LM_FLAG_NOEXP | GL_EXACT,
                                  &sdp->sd_live_gh);
        if (error) {
                fs_err(sdp, "can't acquire live glock: %d\n", error);
@@ -357,6 +359,7 @@ static int init_sb(struct gfs2_sbd *sdp, int silent, int undo)
                error = -ENOMEM;
                iput(inode);
        }
+       sb->s_root->d_op = &gfs2_dops;
 out:
        gfs2_glock_dq_uninit(&sb_gh);
        return error;
@@ -444,8 +447,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo)
        if (sdp->sd_lockstruct.ls_first) {
                unsigned int x;
                for (x = 0; x < sdp->sd_journals; x++) {
-                       error = gfs2_recover_journal(gfs2_jdesc_find(sdp, x),
-                                                    WAIT);
+                       error = gfs2_recover_journal(gfs2_jdesc_find(sdp, x));
                        if (error) {
                                fs_err(sdp, "error recovering journal %u: %d\n",
                                       x, error);
@@ -455,7 +457,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo)
 
                gfs2_lm_others_may_mount(sdp);
        } else if (!sdp->sd_args.ar_spectator) {
-               error = gfs2_recover_journal(sdp->sd_jdesc, WAIT);
+               error = gfs2_recover_journal(sdp->sd_jdesc);
                if (error) {
                        fs_err(sdp, "error recovering my journal: %d\n", error);
                        goto fail_jinode_gh;
@@ -639,7 +641,7 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo)
 
        ip = sdp->sd_ir_inode->u.generic_ip;
        error = gfs2_glock_nq_init(ip->i_gl,
-                                  LM_ST_EXCLUSIVE, GL_NEVER_RECURSE,
+                                  LM_ST_EXCLUSIVE, 0,
                                   &sdp->sd_ir_gh);
        if (error) {
                fs_err(sdp, "can't lock local \"ir\" file: %d\n", error);
@@ -648,7 +650,7 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo)
 
        ip = sdp->sd_sc_inode->u.generic_ip;
        error = gfs2_glock_nq_init(ip->i_gl,
-                                  LM_ST_EXCLUSIVE, GL_NEVER_RECURSE,
+                                  LM_ST_EXCLUSIVE, 0,
                                   &sdp->sd_sc_gh);
        if (error) {
                fs_err(sdp, "can't lock local \"sc\" file: %d\n", error);
@@ -657,7 +659,7 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo)
 
        ip = sdp->sd_ut_inode->u.generic_ip;
        error = gfs2_glock_nq_init(ip->i_gl,
-                                  LM_ST_EXCLUSIVE, GL_NEVER_RECURSE,
+                                  LM_ST_EXCLUSIVE, 0,
                                   &sdp->sd_ut_gh);
        if (error) {
                fs_err(sdp, "can't lock local \"ut\" file: %d\n", error);
@@ -666,7 +668,7 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo)
 
        ip = sdp->sd_qc_inode->u.generic_ip;
        error = gfs2_glock_nq_init(ip->i_gl,
-                                  LM_ST_EXCLUSIVE, GL_NEVER_RECURSE,
+                                  LM_ST_EXCLUSIVE, 0,
                                   &sdp->sd_qc_gh);
        if (error) {
                fs_err(sdp, "can't lock local \"qc\" file: %d\n", error);