diff options
Diffstat (limited to 'fs/gfs2/ops_inode.c')
-rw-r--r-- | fs/gfs2/ops_inode.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 1786a485acc5..bd9b9957f707 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c | |||
@@ -228,32 +228,25 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir, | |||
228 | 228 | ||
229 | out_end_trans: | 229 | out_end_trans: |
230 | gfs2_trans_end(sdp); | 230 | gfs2_trans_end(sdp); |
231 | |||
232 | out_ipres: | 231 | out_ipres: |
233 | if (alloc_required) | 232 | if (alloc_required) |
234 | gfs2_inplace_release(dip); | 233 | gfs2_inplace_release(dip); |
235 | |||
236 | out_gunlock_q: | 234 | out_gunlock_q: |
237 | if (alloc_required) | 235 | if (alloc_required) |
238 | gfs2_quota_unlock(dip); | 236 | gfs2_quota_unlock(dip); |
239 | |||
240 | out_alloc: | 237 | out_alloc: |
241 | if (alloc_required) | 238 | if (alloc_required) |
242 | gfs2_alloc_put(dip); | 239 | gfs2_alloc_put(dip); |
243 | |||
244 | out_gunlock: | 240 | out_gunlock: |
245 | gfs2_glock_dq_m(2, ghs); | 241 | gfs2_glock_dq_m(2, ghs); |
246 | |||
247 | out: | 242 | out: |
248 | gfs2_holder_uninit(ghs); | 243 | gfs2_holder_uninit(ghs); |
249 | gfs2_holder_uninit(ghs + 1); | 244 | gfs2_holder_uninit(ghs + 1); |
250 | |||
251 | if (!error) { | 245 | if (!error) { |
252 | atomic_inc(&inode->i_count); | 246 | atomic_inc(&inode->i_count); |
253 | d_instantiate(dentry, inode); | 247 | d_instantiate(dentry, inode); |
254 | mark_inode_dirty(inode); | 248 | mark_inode_dirty(inode); |
255 | } | 249 | } |
256 | |||
257 | return error; | 250 | return error; |
258 | } | 251 | } |
259 | 252 | ||
@@ -491,13 +484,11 @@ static int gfs2_rmdir(struct inode *dir, struct dentry *dentry) | |||
491 | 484 | ||
492 | gfs2_trans_end(sdp); | 485 | gfs2_trans_end(sdp); |
493 | 486 | ||
494 | out_gunlock: | 487 | out_gunlock: |
495 | gfs2_glock_dq_m(2, ghs); | 488 | gfs2_glock_dq_m(2, ghs); |
496 | 489 | out: | |
497 | out: | ||
498 | gfs2_holder_uninit(ghs); | 490 | gfs2_holder_uninit(ghs); |
499 | gfs2_holder_uninit(ghs + 1); | 491 | gfs2_holder_uninit(ghs + 1); |
500 | |||
501 | return error; | 492 | return error; |
502 | } | 493 | } |
503 | 494 | ||
@@ -966,15 +957,12 @@ static int setattr_chown(struct inode *inode, struct iattr *attr) | |||
966 | gfs2_quota_change(ip, ip->i_di.di_blocks, nuid, ngid); | 957 | gfs2_quota_change(ip, ip->i_di.di_blocks, nuid, ngid); |
967 | } | 958 | } |
968 | 959 | ||
969 | out_end_trans: | 960 | out_end_trans: |
970 | gfs2_trans_end(sdp); | 961 | gfs2_trans_end(sdp); |
971 | 962 | out_gunlock_q: | |
972 | out_gunlock_q: | ||
973 | gfs2_quota_unlock(ip); | 963 | gfs2_quota_unlock(ip); |
974 | 964 | out_alloc: | |
975 | out_alloc: | ||
976 | gfs2_alloc_put(ip); | 965 | gfs2_alloc_put(ip); |
977 | |||
978 | return error; | 966 | return error; |
979 | } | 967 | } |
980 | 968 | ||
@@ -1017,12 +1005,10 @@ static int gfs2_setattr(struct dentry *dentry, struct iattr *attr) | |||
1017 | else | 1005 | else |
1018 | error = gfs2_setattr_simple(ip, attr); | 1006 | error = gfs2_setattr_simple(ip, attr); |
1019 | 1007 | ||
1020 | out: | 1008 | out: |
1021 | gfs2_glock_dq_uninit(&i_gh); | 1009 | gfs2_glock_dq_uninit(&i_gh); |
1022 | |||
1023 | if (!error) | 1010 | if (!error) |
1024 | mark_inode_dirty(inode); | 1011 | mark_inode_dirty(inode); |
1025 | |||
1026 | return error; | 1012 | return error; |
1027 | } | 1013 | } |
1028 | 1014 | ||