@@ -1143,7 +1143,7 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry)
1143
1143
struct gfs2_sbd * sdp = GFS2_SB (dir );
1144
1144
struct inode * inode = d_inode (dentry );
1145
1145
struct gfs2_inode * ip = GFS2_I (inode );
1146
- struct gfs2_holder ghs [ 3 ] ;
1146
+ struct gfs2_holder d_gh , r_gh , gh ;
1147
1147
struct gfs2_rgrpd * rgd ;
1148
1148
int error ;
1149
1149
@@ -1153,21 +1153,21 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry)
1153
1153
1154
1154
error = - EROFS ;
1155
1155
1156
- gfs2_holder_init (dip -> i_gl , LM_ST_EXCLUSIVE , 0 , ghs );
1157
- gfs2_holder_init (ip -> i_gl , LM_ST_EXCLUSIVE , 0 , ghs + 1 );
1156
+ gfs2_holder_init (dip -> i_gl , LM_ST_EXCLUSIVE , 0 , & d_gh );
1157
+ gfs2_holder_init (ip -> i_gl , LM_ST_EXCLUSIVE , 0 , & gh );
1158
1158
1159
1159
rgd = gfs2_blk2rgrpd (sdp , ip -> i_no_addr , 1 );
1160
1160
if (!rgd )
1161
1161
goto out_inodes ;
1162
1162
1163
- gfs2_holder_init (rgd -> rd_gl , LM_ST_EXCLUSIVE , LM_FLAG_NODE_SCOPE , ghs + 2 );
1163
+ gfs2_holder_init (rgd -> rd_gl , LM_ST_EXCLUSIVE , LM_FLAG_NODE_SCOPE , & r_gh );
1164
1164
1165
1165
1166
- error = gfs2_glock_nq (ghs ); /* parent */
1166
+ error = gfs2_glock_nq (& d_gh );
1167
1167
if (error )
1168
1168
goto out_parent ;
1169
1169
1170
- error = gfs2_glock_nq (ghs + 1 ); /* child */
1170
+ error = gfs2_glock_nq (& gh );
1171
1171
if (error )
1172
1172
goto out_child ;
1173
1173
@@ -1181,7 +1181,7 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry)
1181
1181
goto out_rgrp ;
1182
1182
}
1183
1183
1184
- error = gfs2_glock_nq (ghs + 2 ); /* rgrp */
1184
+ error = gfs2_glock_nq (& r_gh ); /* rgrp */
1185
1185
if (error )
1186
1186
goto out_rgrp ;
1187
1187
@@ -1197,16 +1197,16 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry)
1197
1197
gfs2_trans_end (sdp );
1198
1198
1199
1199
out_gunlock :
1200
- gfs2_glock_dq (ghs + 2 );
1200
+ gfs2_glock_dq (& r_gh );
1201
1201
out_rgrp :
1202
- gfs2_glock_dq (ghs + 1 );
1202
+ gfs2_glock_dq (& gh );
1203
1203
out_child :
1204
- gfs2_glock_dq (ghs );
1204
+ gfs2_glock_dq (& d_gh );
1205
1205
out_parent :
1206
- gfs2_holder_uninit (ghs + 2 );
1206
+ gfs2_holder_uninit (& r_gh );
1207
1207
out_inodes :
1208
- gfs2_holder_uninit (ghs + 1 );
1209
- gfs2_holder_uninit (ghs );
1208
+ gfs2_holder_uninit (& gh );
1209
+ gfs2_holder_uninit (& d_gh );
1210
1210
return error ;
1211
1211
}
1212
1212
0 commit comments