diff options
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r-- | fs/gfs2/super.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index b9dd3da22c0a..e5e22629da67 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -722,8 +722,7 @@ static int gfs2_write_inode(struct inode *inode, int sync) | |||
722 | int ret = 0; | 722 | int ret = 0; |
723 | 723 | ||
724 | /* Check this is a "normal" inode, etc */ | 724 | /* Check this is a "normal" inode, etc */ |
725 | if (!test_bit(GIF_USER, &ip->i_flags) || | 725 | if (current->flags & PF_MEMALLOC) |
726 | (current->flags & PF_MEMALLOC)) | ||
727 | return 0; | 726 | return 0; |
728 | ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); | 727 | ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); |
729 | if (ret) | 728 | if (ret) |
@@ -860,6 +859,7 @@ restart: | |||
860 | gfs2_clear_rgrpd(sdp); | 859 | gfs2_clear_rgrpd(sdp); |
861 | gfs2_jindex_free(sdp); | 860 | gfs2_jindex_free(sdp); |
862 | /* Take apart glock structures and buffer lists */ | 861 | /* Take apart glock structures and buffer lists */ |
862 | invalidate_inodes(sdp->sd_vfs); | ||
863 | gfs2_gl_hash_clear(sdp); | 863 | gfs2_gl_hash_clear(sdp); |
864 | /* Unmount the locking protocol */ | 864 | /* Unmount the locking protocol */ |
865 | gfs2_lm_unmount(sdp); | 865 | gfs2_lm_unmount(sdp); |
@@ -1194,7 +1194,7 @@ static void gfs2_drop_inode(struct inode *inode) | |||
1194 | { | 1194 | { |
1195 | struct gfs2_inode *ip = GFS2_I(inode); | 1195 | struct gfs2_inode *ip = GFS2_I(inode); |
1196 | 1196 | ||
1197 | if (test_bit(GIF_USER, &ip->i_flags) && inode->i_nlink) { | 1197 | if (inode->i_nlink) { |
1198 | struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl; | 1198 | struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl; |
1199 | if (gl && test_bit(GLF_DEMOTE, &gl->gl_flags)) | 1199 | if (gl && test_bit(GLF_DEMOTE, &gl->gl_flags)) |
1200 | clear_nlink(inode); | 1200 | clear_nlink(inode); |
@@ -1212,18 +1212,12 @@ static void gfs2_clear_inode(struct inode *inode) | |||
1212 | { | 1212 | { |
1213 | struct gfs2_inode *ip = GFS2_I(inode); | 1213 | struct gfs2_inode *ip = GFS2_I(inode); |
1214 | 1214 | ||
1215 | /* This tells us its a "real" inode and not one which only | 1215 | ip->i_gl->gl_object = NULL; |
1216 | * serves to contain an address space (see rgrp.c, meta_io.c) | 1216 | gfs2_glock_put(ip->i_gl); |
1217 | * which therefore doesn't have its own glocks. | 1217 | ip->i_gl = NULL; |
1218 | */ | 1218 | if (ip->i_iopen_gh.gh_gl) { |
1219 | if (test_bit(GIF_USER, &ip->i_flags)) { | 1219 | ip->i_iopen_gh.gh_gl->gl_object = NULL; |
1220 | ip->i_gl->gl_object = NULL; | 1220 | gfs2_glock_dq_uninit(&ip->i_iopen_gh); |
1221 | gfs2_glock_put(ip->i_gl); | ||
1222 | ip->i_gl = NULL; | ||
1223 | if (ip->i_iopen_gh.gh_gl) { | ||
1224 | ip->i_iopen_gh.gh_gl->gl_object = NULL; | ||
1225 | gfs2_glock_dq_uninit(&ip->i_iopen_gh); | ||
1226 | } | ||
1227 | } | 1221 | } |
1228 | } | 1222 | } |
1229 | 1223 | ||
@@ -1358,9 +1352,6 @@ static void gfs2_delete_inode(struct inode *inode) | |||
1358 | struct gfs2_holder gh; | 1352 | struct gfs2_holder gh; |
1359 | int error; | 1353 | int error; |
1360 | 1354 | ||
1361 | if (!test_bit(GIF_USER, &ip->i_flags)) | ||
1362 | goto out; | ||
1363 | |||
1364 | error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); | 1355 | error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); |
1365 | if (unlikely(error)) { | 1356 | if (unlikely(error)) { |
1366 | gfs2_glock_dq_uninit(&ip->i_iopen_gh); | 1357 | gfs2_glock_dq_uninit(&ip->i_iopen_gh); |