aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r--fs/gfs2/inode.c31
1 files changed, 4 insertions, 27 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index ce7f83306909..d122074c45e1 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -870,33 +870,10 @@ struct inode *gfs2_createi(struct gfs2_holder *ghs, const struct qstr *name,
870 if (error) 870 if (error)
871 goto fail_gunlock; 871 goto fail_gunlock;
872 872
873 if (inum.no_addr < dip->i_num.no_addr) { 873 error = gfs2_glock_nq_num(sdp, inum.no_addr, &gfs2_inode_glops,
874 gfs2_glock_dq(ghs); 874 LM_ST_EXCLUSIVE, GL_SKIP, ghs + 1);
875 875 if (error)
876 error = gfs2_glock_nq_num(sdp, inum.no_addr, 876 goto fail_gunlock;
877 &gfs2_inode_glops, LM_ST_EXCLUSIVE,
878 GL_SKIP, ghs + 1);
879 if (error) {
880 return ERR_PTR(error);
881 }
882
883 gfs2_holder_reinit(LM_ST_EXCLUSIVE, 0, ghs);
884 error = gfs2_glock_nq(ghs);
885 if (error) {
886 gfs2_glock_dq_uninit(ghs + 1);
887 return ERR_PTR(error);
888 }
889
890 error = create_ok(dip, name, mode);
891 if (error)
892 goto fail_gunlock2;
893 } else {
894 error = gfs2_glock_nq_num(sdp, inum.no_addr,
895 &gfs2_inode_glops, LM_ST_EXCLUSIVE,
896 GL_SKIP, ghs + 1);
897 if (error)
898 goto fail_gunlock;
899 }
900 877
901 error = make_dinode(dip, ghs[1].gh_gl, mode, &inum, &generation, dev); 878 error = make_dinode(dip, ghs[1].gh_gl, mode, &inum, &generation, dev);
902 if (error) 879 if (error)