aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/inode.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 3ef0f051d076..87505f7eb745 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -857,7 +857,7 @@ static int gfs2_security_init(struct gfs2_inode *dip, struct gfs2_inode *ip)
857struct inode *gfs2_createi(struct gfs2_holder *ghs, const struct qstr *name, 857struct inode *gfs2_createi(struct gfs2_holder *ghs, const struct qstr *name,
858 unsigned int mode, dev_t dev) 858 unsigned int mode, dev_t dev)
859{ 859{
860 struct inode *inode; 860 struct inode *inode = NULL;
861 struct gfs2_inode *dip = ghs->gh_gl->gl_object; 861 struct gfs2_inode *dip = ghs->gh_gl->gl_object;
862 struct inode *dir = &dip->i_inode; 862 struct inode *dir = &dip->i_inode;
863 struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode); 863 struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode);
@@ -900,28 +900,28 @@ struct inode *gfs2_createi(struct gfs2_holder *ghs, const struct qstr *name,
900 900
901 error = gfs2_inode_refresh(GFS2_I(inode)); 901 error = gfs2_inode_refresh(GFS2_I(inode));
902 if (error) 902 if (error)
903 goto fail_iput; 903 goto fail_gunlock2;
904 904
905 error = gfs2_acl_create(dip, GFS2_I(inode)); 905 error = gfs2_acl_create(dip, GFS2_I(inode));
906 if (error) 906 if (error)
907 goto fail_iput; 907 goto fail_gunlock2;
908 908
909 error = gfs2_security_init(dip, GFS2_I(inode)); 909 error = gfs2_security_init(dip, GFS2_I(inode));
910 if (error) 910 if (error)
911 goto fail_iput; 911 goto fail_gunlock2;
912 912
913 error = link_dinode(dip, name, GFS2_I(inode)); 913 error = link_dinode(dip, name, GFS2_I(inode));
914 if (error) 914 if (error)
915 goto fail_iput; 915 goto fail_gunlock2;
916 916
917 if (!inode) 917 if (!inode)
918 return ERR_PTR(-ENOMEM); 918 return ERR_PTR(-ENOMEM);
919 return inode; 919 return inode;
920 920
921fail_iput:
922 iput(inode);
923fail_gunlock2: 921fail_gunlock2:
924 gfs2_glock_dq_uninit(ghs + 1); 922 gfs2_glock_dq_uninit(ghs + 1);
923 if (inode)
924 iput(inode);
925fail_gunlock: 925fail_gunlock:
926 gfs2_glock_dq(ghs); 926 gfs2_glock_dq(ghs);
927fail: 927fail: