]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/gfs2/super.c
GFS2: Metadata address space clean up
[mirror_ubuntu-bionic-kernel.git] / fs / gfs2 / super.c
index b9dd3da22c0a3fc5452a018cb25dfab89fa6ecf0..ad7bc2d25ac27fad30584a1b2ccf7e3ee5429a5c 100644 (file)
@@ -722,8 +722,7 @@ static int gfs2_write_inode(struct inode *inode, int sync)
        int ret = 0;
 
        /* Check this is a "normal" inode, etc */
-       if (!test_bit(GIF_USER, &ip->i_flags) ||
-           (current->flags & PF_MEMALLOC))
+       if (current->flags & PF_MEMALLOC)
                return 0;
        ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
        if (ret)
@@ -1194,7 +1193,7 @@ static void gfs2_drop_inode(struct inode *inode)
 {
        struct gfs2_inode *ip = GFS2_I(inode);
 
-       if (test_bit(GIF_USER, &ip->i_flags) && inode->i_nlink) {
+       if (inode->i_nlink) {
                struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl;
                if (gl && test_bit(GLF_DEMOTE, &gl->gl_flags))
                        clear_nlink(inode);
@@ -1212,18 +1211,12 @@ static void gfs2_clear_inode(struct inode *inode)
 {
        struct gfs2_inode *ip = GFS2_I(inode);
 
-       /* This tells us its a "real" inode and not one which only
-        * serves to contain an address space (see rgrp.c, meta_io.c)
-        * which therefore doesn't have its own glocks.
-        */
-       if (test_bit(GIF_USER, &ip->i_flags)) {
-               ip->i_gl->gl_object = NULL;
-               gfs2_glock_put(ip->i_gl);
-               ip->i_gl = NULL;
-               if (ip->i_iopen_gh.gh_gl) {
-                       ip->i_iopen_gh.gh_gl->gl_object = NULL;
-                       gfs2_glock_dq_uninit(&ip->i_iopen_gh);
-               }
+       ip->i_gl->gl_object = NULL;
+       gfs2_glock_put(ip->i_gl);
+       ip->i_gl = NULL;
+       if (ip->i_iopen_gh.gh_gl) {
+               ip->i_iopen_gh.gh_gl->gl_object = NULL;
+               gfs2_glock_dq_uninit(&ip->i_iopen_gh);
        }
 }
 
@@ -1358,9 +1351,6 @@ static void gfs2_delete_inode(struct inode *inode)
        struct gfs2_holder gh;
        int error;
 
-       if (!test_bit(GIF_USER, &ip->i_flags))
-               goto out;
-
        error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
        if (unlikely(error)) {
                gfs2_glock_dq_uninit(&ip->i_iopen_gh);