@@ -599,7 +599,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
599
599
{
600
600
const struct qstr * name = & dentry -> d_name ;
601
601
struct posix_acl * default_acl , * acl ;
602
- struct gfs2_holder ghs [ 2 ] ;
602
+ struct gfs2_holder d_gh , gh ;
603
603
struct inode * inode = NULL ;
604
604
struct gfs2_inode * dip = GFS2_I (dir ), * ip ;
605
605
struct gfs2_sbd * sdp = GFS2_SB (& dip -> i_inode );
@@ -620,10 +620,10 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
620
620
if (error )
621
621
goto fail ;
622
622
623
- error = gfs2_glock_nq_init (dip -> i_gl , LM_ST_EXCLUSIVE , 0 , ghs );
623
+ error = gfs2_glock_nq_init (dip -> i_gl , LM_ST_EXCLUSIVE , 0 , & d_gh );
624
624
if (error )
625
625
goto fail ;
626
- gfs2_holder_mark_uninitialized (ghs + 1 );
626
+ gfs2_holder_mark_uninitialized (& gh );
627
627
628
628
error = create_ok (dip , name , mode );
629
629
if (error )
@@ -645,7 +645,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
645
645
else
646
646
error = finish_no_open (file , NULL );
647
647
}
648
- gfs2_glock_dq_uninit (ghs );
648
+ gfs2_glock_dq_uninit (& d_gh );
649
649
goto fail ;
650
650
} else if (error != - ENOENT ) {
651
651
goto fail_gunlock ;
@@ -734,7 +734,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
734
734
if (error )
735
735
goto fail_gunlock2 ;
736
736
737
- error = gfs2_glock_nq_init (ip -> i_gl , LM_ST_EXCLUSIVE , GL_SKIP , ghs + 1 );
737
+ error = gfs2_glock_nq_init (ip -> i_gl , LM_ST_EXCLUSIVE , GL_SKIP , & gh );
738
738
if (error )
739
739
goto fail_gunlock3 ;
740
740
@@ -788,9 +788,9 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
788
788
file -> f_mode |= FMODE_CREATED ;
789
789
error = finish_open (file , dentry , gfs2_open_common );
790
790
}
791
- gfs2_glock_dq_uninit (ghs );
791
+ gfs2_glock_dq_uninit (& d_gh );
792
792
gfs2_qa_put (ip );
793
- gfs2_glock_dq_uninit (ghs + 1 );
793
+ gfs2_glock_dq_uninit (& gh );
794
794
gfs2_glock_put (io_gl );
795
795
gfs2_qa_put (dip );
796
796
unlock_new_inode (inode );
@@ -815,7 +815,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
815
815
posix_acl_release (acl );
816
816
fail_gunlock :
817
817
gfs2_dir_no_add (& da );
818
- gfs2_glock_dq_uninit (ghs );
818
+ gfs2_glock_dq_uninit (& d_gh );
819
819
if (!IS_ERR_OR_NULL (inode )) {
820
820
clear_nlink (inode );
821
821
if (!free_vfs_inode )
@@ -827,8 +827,8 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
827
827
else
828
828
iput (inode );
829
829
}
830
- if (gfs2_holder_initialized (ghs + 1 ))
831
- gfs2_glock_dq_uninit (ghs + 1 );
830
+ if (gfs2_holder_initialized (& gh ))
831
+ gfs2_glock_dq_uninit (& gh );
832
832
fail :
833
833
gfs2_qa_put (dip );
834
834
return error ;
0 commit comments