diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-04 12:04:26 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-04 12:04:26 -0400 |
commit | a91ea69ffd3f8a0b7139bfd44042ab384461e631 (patch) | |
tree | f05952e49e01609b21dbe8d27d9ffd30b4aa507f | |
parent | 75d3b817a0b48425da921052955cc58f20bbab52 (diff) |
[GFS2] Align all labels against LH side
This makes everything consistent.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
-rw-r--r-- | fs/gfs2/acl.c | 14 | ||||
-rw-r--r-- | fs/gfs2/bmap.c | 39 | ||||
-rw-r--r-- | fs/gfs2/dir.c | 18 | ||||
-rw-r--r-- | fs/gfs2/eattr.c | 62 | ||||
-rw-r--r-- | fs/gfs2/glock.c | 3 | ||||
-rw-r--r-- | fs/gfs2/lm.c | 2 | ||||
-rw-r--r-- | fs/gfs2/locking/dlm/lock.c | 2 | ||||
-rw-r--r-- | fs/gfs2/locking/dlm/mount.c | 10 | ||||
-rw-r--r-- | fs/gfs2/locking/dlm/thread.c | 2 | ||||
-rw-r--r-- | fs/gfs2/meta_io.c | 2 | ||||
-rw-r--r-- | fs/gfs2/mount.c | 4 | ||||
-rw-r--r-- | fs/gfs2/ops_dentry.c | 16 | ||||
-rw-r--r-- | fs/gfs2/ops_file.c | 3 | ||||
-rw-r--r-- | fs/gfs2/ops_fstype.c | 73 | ||||
-rw-r--r-- | fs/gfs2/ops_inode.c | 26 | ||||
-rw-r--r-- | fs/gfs2/ops_vm.c | 12 | ||||
-rw-r--r-- | fs/gfs2/quota.c | 49 | ||||
-rw-r--r-- | fs/gfs2/super.c | 27 | ||||
-rw-r--r-- | fs/gfs2/sys.c | 10 |
19 files changed, 129 insertions, 245 deletions
diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index 60c98c0314a1..d846b5ad1d87 100644 --- a/fs/gfs2/acl.c +++ b/fs/gfs2/acl.c | |||
@@ -65,9 +65,8 @@ int gfs2_acl_validate_set(struct gfs2_inode *ip, int access, | |||
65 | error = 0; | 65 | error = 0; |
66 | } | 66 | } |
67 | 67 | ||
68 | out: | 68 | out: |
69 | posix_acl_release(acl); | 69 | posix_acl_release(acl); |
70 | |||
71 | return error; | 70 | return error; |
72 | } | 71 | } |
73 | 72 | ||
@@ -132,18 +131,16 @@ static int acl_get(struct gfs2_inode *ip, int access, struct posix_acl **acl, | |||
132 | error = PTR_ERR(*acl); | 131 | error = PTR_ERR(*acl); |
133 | } | 132 | } |
134 | 133 | ||
135 | out_kfree: | 134 | out_kfree: |
136 | if (error || !data) | 135 | if (error || !data) |
137 | kfree(er.er_data); | 136 | kfree(er.er_data); |
138 | else { | 137 | else { |
139 | *data = er.er_data; | 138 | *data = er.er_data; |
140 | *len = er.er_data_len; | 139 | *len = er.er_data_len; |
141 | } | 140 | } |
142 | 141 | out: | |
143 | out: | ||
144 | if (error || el == &el_this) | 142 | if (error || el == &el_this) |
145 | brelse(el->el_bh); | 143 | brelse(el->el_bh); |
146 | |||
147 | return error; | 144 | return error; |
148 | } | 145 | } |
149 | 146 | ||
@@ -270,7 +267,7 @@ int gfs2_acl_create(struct gfs2_inode *dip, struct gfs2_inode *ip) | |||
270 | } else | 267 | } else |
271 | munge_mode(ip, mode); | 268 | munge_mode(ip, mode); |
272 | 269 | ||
273 | out: | 270 | out: |
274 | posix_acl_release(acl); | 271 | posix_acl_release(acl); |
275 | kfree(er.er_data); | 272 | kfree(er.er_data); |
276 | return error; | 273 | return error; |
@@ -303,11 +300,10 @@ int gfs2_acl_chmod(struct gfs2_inode *ip, struct iattr *attr) | |||
303 | error = gfs2_ea_acl_chmod(ip, &el, attr, data); | 300 | error = gfs2_ea_acl_chmod(ip, &el, attr, data); |
304 | } | 301 | } |
305 | 302 | ||
306 | out: | 303 | out: |
307 | posix_acl_release(acl); | 304 | posix_acl_release(acl); |
308 | brelse(el.el_bh); | 305 | brelse(el.el_bh); |
309 | kfree(data); | 306 | kfree(data); |
310 | |||
311 | return error; | 307 | return error; |
312 | } | 308 | } |
313 | 309 | ||
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index b75a2f93dada..bb597839c0c9 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
@@ -170,12 +170,10 @@ int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page) | |||
170 | 170 | ||
171 | gfs2_dinode_out(&ip->i_di, dibh->b_data); | 171 | gfs2_dinode_out(&ip->i_di, dibh->b_data); |
172 | 172 | ||
173 | out_brelse: | 173 | out_brelse: |
174 | brelse(dibh); | 174 | brelse(dibh); |
175 | 175 | out: | |
176 | out: | ||
177 | up_write(&ip->i_rw_mutex); | 176 | up_write(&ip->i_rw_mutex); |
178 | |||
179 | return error; | 177 | return error; |
180 | } | 178 | } |
181 | 179 | ||
@@ -642,9 +640,8 @@ static int recursive_scan(struct gfs2_inode *ip, struct buffer_head *dibh, | |||
642 | break; | 640 | break; |
643 | } | 641 | } |
644 | 642 | ||
645 | out: | 643 | out: |
646 | brelse(bh); | 644 | brelse(bh); |
647 | |||
648 | return error; | 645 | return error; |
649 | } | 646 | } |
650 | 647 | ||
@@ -788,15 +785,12 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh, | |||
788 | 785 | ||
789 | gfs2_trans_end(sdp); | 786 | gfs2_trans_end(sdp); |
790 | 787 | ||
791 | out_rg_gunlock: | 788 | out_rg_gunlock: |
792 | gfs2_glock_dq_m(rlist.rl_rgrps, rlist.rl_ghs); | 789 | gfs2_glock_dq_m(rlist.rl_rgrps, rlist.rl_ghs); |
793 | 790 | out_rlist: | |
794 | out_rlist: | ||
795 | gfs2_rlist_free(&rlist); | 791 | gfs2_rlist_free(&rlist); |
796 | 792 | out: | |
797 | out: | ||
798 | gfs2_glock_dq_uninit(&ip->i_alloc.al_ri_gh); | 793 | gfs2_glock_dq_uninit(&ip->i_alloc.al_ri_gh); |
799 | |||
800 | return error; | 794 | return error; |
801 | } | 795 | } |
802 | 796 | ||
@@ -868,18 +862,14 @@ static int do_grow(struct gfs2_inode *ip, uint64_t size) | |||
868 | gfs2_dinode_out(&ip->i_di, dibh->b_data); | 862 | gfs2_dinode_out(&ip->i_di, dibh->b_data); |
869 | brelse(dibh); | 863 | brelse(dibh); |
870 | 864 | ||
871 | out_end_trans: | 865 | out_end_trans: |
872 | gfs2_trans_end(sdp); | 866 | gfs2_trans_end(sdp); |
873 | 867 | out_ipres: | |
874 | out_ipres: | ||
875 | gfs2_inplace_release(ip); | 868 | gfs2_inplace_release(ip); |
876 | 869 | out_gunlock_q: | |
877 | out_gunlock_q: | ||
878 | gfs2_quota_unlock(ip); | 870 | gfs2_quota_unlock(ip); |
879 | 871 | out: | |
880 | out: | ||
881 | gfs2_alloc_put(ip); | 872 | gfs2_alloc_put(ip); |
882 | |||
883 | return error; | 873 | return error; |
884 | } | 874 | } |
885 | 875 | ||
@@ -998,9 +988,8 @@ static int trunc_start(struct gfs2_inode *ip, uint64_t size) | |||
998 | 988 | ||
999 | brelse(dibh); | 989 | brelse(dibh); |
1000 | 990 | ||
1001 | out: | 991 | out: |
1002 | gfs2_trans_end(sdp); | 992 | gfs2_trans_end(sdp); |
1003 | |||
1004 | return error; | 993 | return error; |
1005 | } | 994 | } |
1006 | 995 | ||
@@ -1035,7 +1024,7 @@ static int trunc_dealloc(struct gfs2_inode *ip, uint64_t size) | |||
1035 | 1024 | ||
1036 | gfs2_quota_unhold(ip); | 1025 | gfs2_quota_unhold(ip); |
1037 | 1026 | ||
1038 | out: | 1027 | out: |
1039 | gfs2_alloc_put(ip); | 1028 | gfs2_alloc_put(ip); |
1040 | return error; | 1029 | return error; |
1041 | } | 1030 | } |
@@ -1070,11 +1059,9 @@ static int trunc_end(struct gfs2_inode *ip) | |||
1070 | gfs2_dinode_out(&ip->i_di, dibh->b_data); | 1059 | gfs2_dinode_out(&ip->i_di, dibh->b_data); |
1071 | brelse(dibh); | 1060 | brelse(dibh); |
1072 | 1061 | ||
1073 | out: | 1062 | out: |
1074 | up_write(&ip->i_rw_mutex); | 1063 | up_write(&ip->i_rw_mutex); |
1075 | |||
1076 | gfs2_trans_end(sdp); | 1064 | gfs2_trans_end(sdp); |
1077 | |||
1078 | return error; | 1065 | return error; |
1079 | } | 1066 | } |
1080 | 1067 | ||
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 7b8a38eaa41a..59d0cbcaecff 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -1134,9 +1134,8 @@ static int dir_double_exhash(struct gfs2_inode *dip) | |||
1134 | 1134 | ||
1135 | return error; | 1135 | return error; |
1136 | 1136 | ||
1137 | fail: | 1137 | fail: |
1138 | kfree(buf); | 1138 | kfree(buf); |
1139 | |||
1140 | return error; | 1139 | return error; |
1141 | } | 1140 | } |
1142 | 1141 | ||
@@ -1890,23 +1889,18 @@ static int leaf_dealloc(struct gfs2_inode *dip, uint32_t index, uint32_t len, | |||
1890 | gfs2_dinode_out(&dip->i_di, dibh->b_data); | 1889 | gfs2_dinode_out(&dip->i_di, dibh->b_data); |
1891 | brelse(dibh); | 1890 | brelse(dibh); |
1892 | 1891 | ||
1893 | out_end_trans: | 1892 | out_end_trans: |
1894 | gfs2_trans_end(sdp); | 1893 | gfs2_trans_end(sdp); |
1895 | 1894 | out_rg_gunlock: | |
1896 | out_rg_gunlock: | ||
1897 | gfs2_glock_dq_m(rlist.rl_rgrps, rlist.rl_ghs); | 1895 | gfs2_glock_dq_m(rlist.rl_rgrps, rlist.rl_ghs); |
1898 | 1896 | out_rlist: | |
1899 | out_rlist: | ||
1900 | gfs2_rlist_free(&rlist); | 1897 | gfs2_rlist_free(&rlist); |
1901 | gfs2_glock_dq_uninit(&dip->i_alloc.al_ri_gh); | 1898 | gfs2_glock_dq_uninit(&dip->i_alloc.al_ri_gh); |
1902 | 1899 | out_qs: | |
1903 | out_qs: | ||
1904 | gfs2_quota_unhold(dip); | 1900 | gfs2_quota_unhold(dip); |
1905 | 1901 | out: | |
1906 | out: | ||
1907 | gfs2_alloc_put(dip); | 1902 | gfs2_alloc_put(dip); |
1908 | kfree(ht); | 1903 | kfree(ht); |
1909 | |||
1910 | return error; | 1904 | return error; |
1911 | } | 1905 | } |
1912 | 1906 | ||
diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c index 9081822ce80c..5a56e6568622 100644 --- a/fs/gfs2/eattr.c +++ b/fs/gfs2/eattr.c | |||
@@ -107,7 +107,7 @@ static int ea_foreach_i(struct gfs2_inode *ip, struct buffer_head *bh, | |||
107 | 107 | ||
108 | return error; | 108 | return error; |
109 | 109 | ||
110 | fail: | 110 | fail: |
111 | gfs2_consist_inode(ip); | 111 | gfs2_consist_inode(ip); |
112 | return -EIO; | 112 | return -EIO; |
113 | } | 113 | } |
@@ -152,9 +152,8 @@ static int ea_foreach(struct gfs2_inode *ip, ea_call_t ea_call, void *data) | |||
152 | if (error) | 152 | if (error) |
153 | break; | 153 | break; |
154 | } | 154 | } |
155 | out: | 155 | out: |
156 | brelse(bh); | 156 | brelse(bh); |
157 | |||
158 | return error; | 157 | return error; |
159 | } | 158 | } |
160 | 159 | ||
@@ -319,9 +318,8 @@ static int ea_dealloc_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh, | |||
319 | 318 | ||
320 | gfs2_trans_end(sdp); | 319 | gfs2_trans_end(sdp); |
321 | 320 | ||
322 | out_gunlock: | 321 | out_gunlock: |
323 | gfs2_glock_dq_uninit(&rg_gh); | 322 | gfs2_glock_dq_uninit(&rg_gh); |
324 | |||
325 | return error; | 323 | return error; |
326 | } | 324 | } |
327 | 325 | ||
@@ -348,12 +346,10 @@ static int ea_remove_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh, | |||
348 | 346 | ||
349 | gfs2_glock_dq_uninit(&al->al_ri_gh); | 347 | gfs2_glock_dq_uninit(&al->al_ri_gh); |
350 | 348 | ||
351 | out_quota: | 349 | out_quota: |
352 | gfs2_quota_unhold(ip); | 350 | gfs2_quota_unhold(ip); |
353 | 351 | out_alloc: | |
354 | out_alloc: | ||
355 | gfs2_alloc_put(ip); | 352 | gfs2_alloc_put(ip); |
356 | |||
357 | return error; | 353 | return error; |
358 | } | 354 | } |
359 | 355 | ||
@@ -506,9 +502,8 @@ static int ea_get_unstuffed(struct gfs2_inode *ip, struct gfs2_ea_header *ea, | |||
506 | brelse(bh[x]); | 502 | brelse(bh[x]); |
507 | } | 503 | } |
508 | 504 | ||
509 | out: | 505 | out: |
510 | kfree(bh); | 506 | kfree(bh); |
511 | |||
512 | return error; | 507 | return error; |
513 | } | 508 | } |
514 | 509 | ||
@@ -747,18 +742,14 @@ static int ea_alloc_skeleton(struct gfs2_inode *ip, struct gfs2_ea_request *er, | |||
747 | brelse(dibh); | 742 | brelse(dibh); |
748 | } | 743 | } |
749 | 744 | ||
750 | out_end_trans: | 745 | out_end_trans: |
751 | gfs2_trans_end(GFS2_SB(&ip->i_inode)); | 746 | gfs2_trans_end(GFS2_SB(&ip->i_inode)); |
752 | 747 | out_ipres: | |
753 | out_ipres: | ||
754 | gfs2_inplace_release(ip); | 748 | gfs2_inplace_release(ip); |
755 | 749 | out_gunlock_q: | |
756 | out_gunlock_q: | ||
757 | gfs2_quota_unlock(ip); | 750 | gfs2_quota_unlock(ip); |
758 | 751 | out: | |
759 | out: | ||
760 | gfs2_alloc_put(ip); | 752 | gfs2_alloc_put(ip); |
761 | |||
762 | return error; | 753 | return error; |
763 | } | 754 | } |
764 | 755 | ||
@@ -884,9 +875,8 @@ static int ea_set_simple_noalloc(struct gfs2_inode *ip, struct buffer_head *bh, | |||
884 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 875 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
885 | gfs2_dinode_out(&ip->i_di, dibh->b_data); | 876 | gfs2_dinode_out(&ip->i_di, dibh->b_data); |
886 | brelse(dibh); | 877 | brelse(dibh); |
887 | out: | 878 | out: |
888 | gfs2_trans_end(GFS2_SB(&ip->i_inode)); | 879 | gfs2_trans_end(GFS2_SB(&ip->i_inode)); |
889 | |||
890 | return error; | 880 | return error; |
891 | } | 881 | } |
892 | 882 | ||
@@ -1025,9 +1015,8 @@ static int ea_set_block(struct gfs2_inode *ip, struct gfs2_ea_request *er, | |||
1025 | if (private) | 1015 | if (private) |
1026 | ea_set_remove_stuffed(ip, (struct gfs2_ea_location *)private); | 1016 | ea_set_remove_stuffed(ip, (struct gfs2_ea_location *)private); |
1027 | 1017 | ||
1028 | out: | 1018 | out: |
1029 | brelse(indbh); | 1019 | brelse(indbh); |
1030 | |||
1031 | return error; | 1020 | return error; |
1032 | } | 1021 | } |
1033 | 1022 | ||
@@ -1285,15 +1274,13 @@ static int ea_acl_chmod_unstuffed(struct gfs2_inode *ip, | |||
1285 | brelse(bh[x]); | 1274 | brelse(bh[x]); |
1286 | } | 1275 | } |
1287 | 1276 | ||
1288 | out: | 1277 | out: |
1289 | kfree(bh); | 1278 | kfree(bh); |
1290 | |||
1291 | return error; | 1279 | return error; |
1292 | 1280 | ||
1293 | fail: | 1281 | fail: |
1294 | gfs2_trans_end(sdp); | 1282 | gfs2_trans_end(sdp); |
1295 | kfree(bh); | 1283 | kfree(bh); |
1296 | |||
1297 | return error; | 1284 | return error; |
1298 | } | 1285 | } |
1299 | 1286 | ||
@@ -1442,15 +1429,12 @@ static int ea_dealloc_indirect(struct gfs2_inode *ip) | |||
1442 | 1429 | ||
1443 | gfs2_trans_end(sdp); | 1430 | gfs2_trans_end(sdp); |
1444 | 1431 | ||
1445 | out_gunlock: | 1432 | out_gunlock: |
1446 | gfs2_glock_dq_m(rlist.rl_rgrps, rlist.rl_ghs); | 1433 | gfs2_glock_dq_m(rlist.rl_rgrps, rlist.rl_ghs); |
1447 | 1434 | out_rlist_free: | |
1448 | out_rlist_free: | ||
1449 | gfs2_rlist_free(&rlist); | 1435 | gfs2_rlist_free(&rlist); |
1450 | 1436 | out: | |
1451 | out: | ||
1452 | brelse(indbh); | 1437 | brelse(indbh); |
1453 | |||
1454 | return error; | 1438 | return error; |
1455 | } | 1439 | } |
1456 | 1440 | ||
@@ -1494,9 +1478,8 @@ static int ea_dealloc_block(struct gfs2_inode *ip) | |||
1494 | 1478 | ||
1495 | gfs2_trans_end(sdp); | 1479 | gfs2_trans_end(sdp); |
1496 | 1480 | ||
1497 | out_gunlock: | 1481 | out_gunlock: |
1498 | gfs2_glock_dq_uninit(&al->al_rgd_gh); | 1482 | gfs2_glock_dq_uninit(&al->al_rgd_gh); |
1499 | |||
1500 | return error; | 1483 | return error; |
1501 | } | 1484 | } |
1502 | 1485 | ||
@@ -1534,15 +1517,12 @@ int gfs2_ea_dealloc(struct gfs2_inode *ip) | |||
1534 | 1517 | ||
1535 | error = ea_dealloc_block(ip); | 1518 | error = ea_dealloc_block(ip); |
1536 | 1519 | ||
1537 | out_rindex: | 1520 | out_rindex: |
1538 | gfs2_glock_dq_uninit(&al->al_ri_gh); | 1521 | gfs2_glock_dq_uninit(&al->al_ri_gh); |
1539 | 1522 | out_quota: | |
1540 | out_quota: | ||
1541 | gfs2_quota_unhold(ip); | 1523 | gfs2_quota_unhold(ip); |
1542 | 1524 | out_alloc: | |
1543 | out_alloc: | ||
1544 | gfs2_alloc_put(ip); | 1525 | gfs2_alloc_put(ip); |
1545 | |||
1546 | return error; | 1526 | return error; |
1547 | } | 1527 | } |
1548 | 1528 | ||
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index fac271f390bf..1c916fedc04b 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -2179,9 +2179,8 @@ static int dump_glock(struct gfs2_glock *gl) | |||
2179 | 2179 | ||
2180 | error = 0; | 2180 | error = 0; |
2181 | 2181 | ||
2182 | out: | 2182 | out: |
2183 | spin_unlock(&gl->gl_spin); | 2183 | spin_unlock(&gl->gl_spin); |
2184 | |||
2185 | return error; | 2184 | return error; |
2186 | } | 2185 | } |
2187 | 2186 | ||
diff --git a/fs/gfs2/lm.c b/fs/gfs2/lm.c index fb918c7de655..e60f95cae6c5 100644 --- a/fs/gfs2/lm.c +++ b/fs/gfs2/lm.c | |||
@@ -76,7 +76,7 @@ int gfs2_lm_mount(struct gfs2_sbd *sdp, int silent) | |||
76 | sdp->sd_args.ar_localcaching = 1; | 76 | sdp->sd_args.ar_localcaching = 1; |
77 | } | 77 | } |
78 | 78 | ||
79 | out: | 79 | out: |
80 | return error; | 80 | return error; |
81 | } | 81 | } |
82 | 82 | ||
diff --git a/fs/gfs2/locking/dlm/lock.c b/fs/gfs2/locking/dlm/lock.c index 2d81d90db097..1f15b6e8b2cf 100644 --- a/fs/gfs2/locking/dlm/lock.c +++ b/fs/gfs2/locking/dlm/lock.c | |||
@@ -437,7 +437,7 @@ static int hold_null_lock(struct gdlm_lock *lp) | |||
437 | gdlm_delete_lp(lpn); | 437 | gdlm_delete_lp(lpn); |
438 | lpn = NULL; | 438 | lpn = NULL; |
439 | } | 439 | } |
440 | out: | 440 | out: |
441 | lp->hold_null = lpn; | 441 | lp->hold_null = lpn; |
442 | return error; | 442 | return error; |
443 | } | 443 | } |
diff --git a/fs/gfs2/locking/dlm/mount.c b/fs/gfs2/locking/dlm/mount.c index f279385774b7..82ac00af84a3 100644 --- a/fs/gfs2/locking/dlm/mount.c +++ b/fs/gfs2/locking/dlm/mount.c | |||
@@ -164,13 +164,13 @@ static int gdlm_mount(char *table_name, char *host_data, | |||
164 | lockstruct->ls_lvb_size = GDLM_LVB_SIZE; | 164 | lockstruct->ls_lvb_size = GDLM_LVB_SIZE; |
165 | return 0; | 165 | return 0; |
166 | 166 | ||
167 | out_kobj: | 167 | out_kobj: |
168 | gdlm_kobject_release(ls); | 168 | gdlm_kobject_release(ls); |
169 | out_thread: | 169 | out_thread: |
170 | gdlm_release_threads(ls); | 170 | gdlm_release_threads(ls); |
171 | out_free: | 171 | out_free: |
172 | kfree(ls); | 172 | kfree(ls); |
173 | out: | 173 | out: |
174 | return error; | 174 | return error; |
175 | } | 175 | } |
176 | 176 | ||
@@ -194,7 +194,7 @@ static void gdlm_unmount(lm_lockspace_t *lockspace) | |||
194 | rv = gdlm_release_all_locks(ls); | 194 | rv = gdlm_release_all_locks(ls); |
195 | if (rv) | 195 | if (rv) |
196 | log_info("gdlm_unmount: %d stray locks freed", rv); | 196 | log_info("gdlm_unmount: %d stray locks freed", rv); |
197 | out: | 197 | out: |
198 | kfree(ls); | 198 | kfree(ls); |
199 | } | 199 | } |
200 | 200 | ||
diff --git a/fs/gfs2/locking/dlm/thread.c b/fs/gfs2/locking/dlm/thread.c index 0b4be102e170..a782246d666b 100644 --- a/fs/gfs2/locking/dlm/thread.c +++ b/fs/gfs2/locking/dlm/thread.c | |||
@@ -206,7 +206,7 @@ static void process_complete(struct gdlm_lock *lp) | |||
206 | if (lp->lksb.sb_flags & DLM_SBF_DEMOTED) | 206 | if (lp->lksb.sb_flags & DLM_SBF_DEMOTED) |
207 | set_bit(LFL_NOCACHE, &lp->flags); | 207 | set_bit(LFL_NOCACHE, &lp->flags); |
208 | 208 | ||
209 | out: | 209 | out: |
210 | /* | 210 | /* |
211 | * This is an internal lock_dlm lock | 211 | * This is an internal lock_dlm lock |
212 | */ | 212 | */ |
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 03850b64c072..3f6da00e2f59 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c | |||
@@ -756,7 +756,7 @@ void gfs2_meta_ra(struct gfs2_glock *gl, uint64_t dblock, uint32_t extlen) | |||
756 | break; | 756 | break; |
757 | } | 757 | } |
758 | 758 | ||
759 | out: | 759 | out: |
760 | brelse(first_bh); | 760 | brelse(first_bh); |
761 | } | 761 | } |
762 | 762 | ||
diff --git a/fs/gfs2/mount.c b/fs/gfs2/mount.c index b66027827aaa..257c4a179dc6 100644 --- a/fs/gfs2/mount.c +++ b/fs/gfs2/mount.c | |||
@@ -203,11 +203,11 @@ int gfs2_mount_args(struct gfs2_sbd *sdp, char *data_arg, int remount) | |||
203 | 203 | ||
204 | return error; | 204 | return error; |
205 | 205 | ||
206 | need_value: | 206 | need_value: |
207 | fs_info(sdp, "need value for option %s\n", o); | 207 | fs_info(sdp, "need value for option %s\n", o); |
208 | return -EINVAL; | 208 | return -EINVAL; |
209 | 209 | ||
210 | cant_remount: | 210 | cant_remount: |
211 | fs_info(sdp, "can't remount with option %s\n", o); | 211 | fs_info(sdp, "can't remount with option %s\n", o); |
212 | return -EINVAL; | 212 | return -EINVAL; |
213 | } | 213 | } |
diff --git a/fs/gfs2/ops_dentry.c b/fs/gfs2/ops_dentry.c index a1ba1ec8eef4..fa6ceffc7d82 100644 --- a/fs/gfs2/ops_dentry.c +++ b/fs/gfs2/ops_dentry.c | |||
@@ -81,31 +81,27 @@ static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd) | |||
81 | goto fail_gunlock; | 81 | goto fail_gunlock; |
82 | } | 82 | } |
83 | 83 | ||
84 | valid_gunlock: | 84 | valid_gunlock: |
85 | gfs2_glock_dq_uninit(&d_gh); | 85 | gfs2_glock_dq_uninit(&d_gh); |
86 | 86 | valid: | |
87 | valid: | ||
88 | dput(parent); | 87 | dput(parent); |
89 | return 1; | 88 | return 1; |
90 | 89 | ||
91 | invalid_gunlock: | 90 | invalid_gunlock: |
92 | gfs2_glock_dq_uninit(&d_gh); | 91 | gfs2_glock_dq_uninit(&d_gh); |
93 | 92 | invalid: | |
94 | invalid: | ||
95 | if (inode && S_ISDIR(inode->i_mode)) { | 93 | if (inode && S_ISDIR(inode->i_mode)) { |
96 | if (have_submounts(dentry)) | 94 | if (have_submounts(dentry)) |
97 | goto valid; | 95 | goto valid; |
98 | shrink_dcache_parent(dentry); | 96 | shrink_dcache_parent(dentry); |
99 | } | 97 | } |
100 | d_drop(dentry); | 98 | d_drop(dentry); |
101 | |||
102 | dput(parent); | 99 | dput(parent); |
103 | return 0; | 100 | return 0; |
104 | 101 | ||
105 | fail_gunlock: | 102 | fail_gunlock: |
106 | gfs2_glock_dq_uninit(&d_gh); | 103 | gfs2_glock_dq_uninit(&d_gh); |
107 | 104 | fail: | |
108 | fail: | ||
109 | dput(parent); | 105 | dput(parent); |
110 | return 0; | 106 | return 0; |
111 | } | 107 | } |
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c index 07a0c861ac41..53ce7816dc18 100644 --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c | |||
@@ -345,9 +345,8 @@ static int readdir_bad(struct file *file, void *dirent, filldir_t filldir) | |||
345 | 345 | ||
346 | file->f_pos = offset; | 346 | file->f_pos = offset; |
347 | 347 | ||
348 | out: | 348 | out: |
349 | kfree(fdb); | 349 | kfree(fdb); |
350 | |||
351 | return error; | 350 | return error; |
352 | } | 351 | } |
353 | 352 | ||
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 46f910e29bf0..d39314d5dd0a 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c | |||
@@ -173,9 +173,8 @@ static int init_names(struct gfs2_sbd *sdp, int silent) | |||
173 | snprintf(sdp->sd_proto_name, GFS2_FSNAME_LEN, "%s", proto); | 173 | snprintf(sdp->sd_proto_name, GFS2_FSNAME_LEN, "%s", proto); |
174 | snprintf(sdp->sd_table_name, GFS2_FSNAME_LEN, "%s", table); | 174 | snprintf(sdp->sd_table_name, GFS2_FSNAME_LEN, "%s", table); |
175 | 175 | ||
176 | out: | 176 | out: |
177 | kfree(sb); | 177 | kfree(sb); |
178 | |||
179 | return error; | 178 | return error; |
180 | } | 179 | } |
181 | 180 | ||
@@ -246,22 +245,17 @@ static int init_locking(struct gfs2_sbd *sdp, struct gfs2_holder *mount_gh, | |||
246 | 245 | ||
247 | fail_trans: | 246 | fail_trans: |
248 | gfs2_glock_put(sdp->sd_trans_gl); | 247 | gfs2_glock_put(sdp->sd_trans_gl); |
249 | |||
250 | fail_rename: | 248 | fail_rename: |
251 | gfs2_glock_put(sdp->sd_rename_gl); | 249 | gfs2_glock_put(sdp->sd_rename_gl); |
252 | |||
253 | fail_live: | 250 | fail_live: |
254 | gfs2_glock_dq_uninit(&sdp->sd_live_gh); | 251 | gfs2_glock_dq_uninit(&sdp->sd_live_gh); |
255 | |||
256 | fail_mount: | 252 | fail_mount: |
257 | gfs2_glock_dq_uninit(mount_gh); | 253 | gfs2_glock_dq_uninit(mount_gh); |
258 | |||
259 | fail: | 254 | fail: |
260 | while (sdp->sd_glockd_num--) | 255 | while (sdp->sd_glockd_num--) |
261 | kthread_stop(sdp->sd_glockd_process[sdp->sd_glockd_num]); | 256 | kthread_stop(sdp->sd_glockd_process[sdp->sd_glockd_num]); |
262 | 257 | ||
263 | kthread_stop(sdp->sd_scand_process); | 258 | kthread_stop(sdp->sd_scand_process); |
264 | |||
265 | return error; | 259 | return error; |
266 | } | 260 | } |
267 | 261 | ||
@@ -451,25 +445,20 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) | |||
451 | 445 | ||
452 | return 0; | 446 | return 0; |
453 | 447 | ||
454 | fail_recoverd: | 448 | fail_recoverd: |
455 | kthread_stop(sdp->sd_recoverd_process); | 449 | kthread_stop(sdp->sd_recoverd_process); |
456 | 450 | fail_jinode_gh: | |
457 | fail_jinode_gh: | ||
458 | if (!sdp->sd_args.ar_spectator) | 451 | if (!sdp->sd_args.ar_spectator) |
459 | gfs2_glock_dq_uninit(&sdp->sd_jinode_gh); | 452 | gfs2_glock_dq_uninit(&sdp->sd_jinode_gh); |
460 | 453 | fail_journal_gh: | |
461 | fail_journal_gh: | ||
462 | if (!sdp->sd_args.ar_spectator) | 454 | if (!sdp->sd_args.ar_spectator) |
463 | gfs2_glock_dq_uninit(&sdp->sd_journal_gh); | 455 | gfs2_glock_dq_uninit(&sdp->sd_journal_gh); |
464 | 456 | fail_jindex: | |
465 | fail_jindex: | ||
466 | gfs2_jindex_free(sdp); | 457 | gfs2_jindex_free(sdp); |
467 | if (jindex) | 458 | if (jindex) |
468 | gfs2_glock_dq_uninit(&ji_gh); | 459 | gfs2_glock_dq_uninit(&ji_gh); |
469 | 460 | fail: | |
470 | fail: | ||
471 | iput(sdp->sd_jindex); | 461 | iput(sdp->sd_jindex); |
472 | |||
473 | return error; | 462 | return error; |
474 | } | 463 | } |
475 | 464 | ||
@@ -534,14 +523,11 @@ static int init_inodes(struct gfs2_sbd *sdp, int undo) | |||
534 | 523 | ||
535 | fail_qinode: | 524 | fail_qinode: |
536 | iput(sdp->sd_quota_inode); | 525 | iput(sdp->sd_quota_inode); |
537 | |||
538 | fail_rindex: | 526 | fail_rindex: |
539 | gfs2_clear_rgrpd(sdp); | 527 | gfs2_clear_rgrpd(sdp); |
540 | iput(sdp->sd_rindex); | 528 | iput(sdp->sd_rindex); |
541 | |||
542 | fail_statfs: | 529 | fail_statfs: |
543 | iput(sdp->sd_statfs_inode); | 530 | iput(sdp->sd_statfs_inode); |
544 | |||
545 | fail_inum: | 531 | fail_inum: |
546 | iput(sdp->sd_inum_inode); | 532 | iput(sdp->sd_inum_inode); |
547 | fail_journal: | 533 | fail_journal: |
@@ -628,27 +614,19 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo) | |||
628 | 614 | ||
629 | return 0; | 615 | return 0; |
630 | 616 | ||
631 | fail_qc_gh: | 617 | fail_qc_gh: |
632 | gfs2_glock_dq_uninit(&sdp->sd_qc_gh); | 618 | gfs2_glock_dq_uninit(&sdp->sd_qc_gh); |
633 | 619 | fail_ut_gh: | |
634 | fail_ut_gh: | ||
635 | |||
636 | gfs2_glock_dq_uninit(&sdp->sd_sc_gh); | 620 | gfs2_glock_dq_uninit(&sdp->sd_sc_gh); |
637 | 621 | fail_ir_gh: | |
638 | fail_ir_gh: | ||
639 | gfs2_glock_dq_uninit(&sdp->sd_ir_gh); | 622 | gfs2_glock_dq_uninit(&sdp->sd_ir_gh); |
640 | 623 | fail_qc_i: | |
641 | fail_qc_i: | ||
642 | iput(sdp->sd_qc_inode); | 624 | iput(sdp->sd_qc_inode); |
643 | 625 | fail_ut_i: | |
644 | fail_ut_i: | ||
645 | |||
646 | iput(sdp->sd_sc_inode); | 626 | iput(sdp->sd_sc_inode); |
647 | 627 | fail_ir_i: | |
648 | fail_ir_i: | ||
649 | iput(sdp->sd_ir_inode); | 628 | iput(sdp->sd_ir_inode); |
650 | 629 | fail: | |
651 | fail: | ||
652 | if (pn) | 630 | if (pn) |
653 | iput(pn); | 631 | iput(pn); |
654 | return error; | 632 | return error; |
@@ -781,34 +759,26 @@ static int fill_super(struct super_block *sb, void *data, int silent) | |||
781 | 759 | ||
782 | return 0; | 760 | return 0; |
783 | 761 | ||
784 | fail_threads: | 762 | fail_threads: |
785 | init_threads(sdp, UNDO); | 763 | init_threads(sdp, UNDO); |
786 | 764 | fail_per_node: | |
787 | fail_per_node: | ||
788 | init_per_node(sdp, UNDO); | 765 | init_per_node(sdp, UNDO); |
789 | 766 | fail_inodes: | |
790 | fail_inodes: | ||
791 | init_inodes(sdp, UNDO); | 767 | init_inodes(sdp, UNDO); |
792 | 768 | fail_sb: | |
793 | fail_sb: | ||
794 | init_sb(sdp, 0, UNDO); | 769 | init_sb(sdp, 0, UNDO); |
795 | 770 | fail_locking: | |
796 | fail_locking: | ||
797 | init_locking(sdp, &mount_gh, UNDO); | 771 | init_locking(sdp, &mount_gh, UNDO); |
798 | 772 | fail_lm: | |
799 | fail_lm: | ||
800 | gfs2_gl_hash_clear(sdp, WAIT); | 773 | gfs2_gl_hash_clear(sdp, WAIT); |
801 | gfs2_lm_unmount(sdp); | 774 | gfs2_lm_unmount(sdp); |
802 | while (invalidate_inodes(sb)) | 775 | while (invalidate_inodes(sb)) |
803 | yield(); | 776 | yield(); |
804 | 777 | fail_sys: | |
805 | fail_sys: | ||
806 | gfs2_sys_fs_del(sdp); | 778 | gfs2_sys_fs_del(sdp); |
807 | 779 | fail: | |
808 | fail: | ||
809 | vfree(sdp); | 780 | vfree(sdp); |
810 | sb->s_fs_info = NULL; | 781 | sb->s_fs_info = NULL; |
811 | |||
812 | return error; | 782 | return error; |
813 | } | 783 | } |
814 | 784 | ||
@@ -852,6 +822,7 @@ static int fill_super_meta(struct super_block *sb, struct super_block *new, | |||
852 | 822 | ||
853 | return error; | 823 | return error; |
854 | } | 824 | } |
825 | |||
855 | static int set_bdev_super(struct super_block *s, void *data) | 826 | static int set_bdev_super(struct super_block *s, void *data) |
856 | { | 827 | { |
857 | s->s_bdev = data; | 828 | s->s_bdev = data; |
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 | ||
diff --git a/fs/gfs2/ops_vm.c b/fs/gfs2/ops_vm.c index 451f48d62e58..32ec8574ac8e 100644 --- a/fs/gfs2/ops_vm.c +++ b/fs/gfs2/ops_vm.c | |||
@@ -115,18 +115,14 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page) | |||
115 | 115 | ||
116 | gfs2_assert_warn(sdp, al->al_alloced); | 116 | gfs2_assert_warn(sdp, al->al_alloced); |
117 | 117 | ||
118 | out_trans: | 118 | out_trans: |
119 | gfs2_trans_end(sdp); | 119 | gfs2_trans_end(sdp); |
120 | 120 | out_ipres: | |
121 | out_ipres: | ||
122 | gfs2_inplace_release(ip); | 121 | gfs2_inplace_release(ip); |
123 | 122 | out_gunlock_q: | |
124 | out_gunlock_q: | ||
125 | gfs2_quota_unlock(ip); | 123 | gfs2_quota_unlock(ip); |
126 | 124 | out: | |
127 | out: | ||
128 | gfs2_alloc_put(ip); | 125 | gfs2_alloc_put(ip); |
129 | |||
130 | return error; | 126 | return error; |
131 | } | 127 | } |
132 | 128 | ||
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index be87983a20a9..572b92eac367 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c | |||
@@ -105,7 +105,7 @@ static int qd_alloc(struct gfs2_sbd *sdp, int user, uint32_t id, | |||
105 | 105 | ||
106 | return 0; | 106 | return 0; |
107 | 107 | ||
108 | fail: | 108 | fail: |
109 | kfree(qd); | 109 | kfree(qd); |
110 | return error; | 110 | return error; |
111 | } | 111 | } |
@@ -199,7 +199,7 @@ static int slot_get(struct gfs2_quota_data *qd) | |||
199 | 199 | ||
200 | goto fail; | 200 | goto fail; |
201 | 201 | ||
202 | found: | 202 | found: |
203 | for (b = 0; b < 8; b++) | 203 | for (b = 0; b < 8; b++) |
204 | if (!(byte & (1 << b))) | 204 | if (!(byte & (1 << b))) |
205 | break; | 205 | break; |
@@ -214,7 +214,7 @@ static int slot_get(struct gfs2_quota_data *qd) | |||
214 | 214 | ||
215 | return 0; | 215 | return 0; |
216 | 216 | ||
217 | fail: | 217 | fail: |
218 | qd->qd_slot_count--; | 218 | qd->qd_slot_count--; |
219 | spin_unlock(&sdp->sd_quota_spin); | 219 | spin_unlock(&sdp->sd_quota_spin); |
220 | return -ENOSPC; | 220 | return -ENOSPC; |
@@ -283,10 +283,9 @@ static int bh_get(struct gfs2_quota_data *qd) | |||
283 | 283 | ||
284 | return 0; | 284 | return 0; |
285 | 285 | ||
286 | fail_brelse: | 286 | fail_brelse: |
287 | brelse(bh); | 287 | brelse(bh); |
288 | 288 | fail: | |
289 | fail: | ||
290 | qd->qd_bh_count--; | 289 | qd->qd_bh_count--; |
291 | mutex_unlock(&sdp->sd_quota_mutex); | 290 | mutex_unlock(&sdp->sd_quota_mutex); |
292 | return error; | 291 | return error; |
@@ -425,10 +424,9 @@ static int qdsb_get(struct gfs2_sbd *sdp, int user, uint32_t id, int create, | |||
425 | 424 | ||
426 | return 0; | 425 | return 0; |
427 | 426 | ||
428 | fail_slot: | 427 | fail_slot: |
429 | slot_put(*qdp); | 428 | slot_put(*qdp); |
430 | 429 | fail: | |
431 | fail: | ||
432 | qd_put(*qdp); | 430 | qd_put(*qdp); |
433 | return error; | 431 | return error; |
434 | } | 432 | } |
@@ -482,10 +480,9 @@ int gfs2_quota_hold(struct gfs2_inode *ip, uint32_t uid, uint32_t gid) | |||
482 | qd++; | 480 | qd++; |
483 | } | 481 | } |
484 | 482 | ||
485 | out: | 483 | out: |
486 | if (error) | 484 | if (error) |
487 | gfs2_quota_unhold(ip); | 485 | gfs2_quota_unhold(ip); |
488 | |||
489 | return error; | 486 | return error; |
490 | } | 487 | } |
491 | 488 | ||
@@ -728,26 +725,21 @@ static int do_sync(unsigned int num_qd, struct gfs2_quota_data **qda) | |||
728 | 725 | ||
729 | error = 0; | 726 | error = 0; |
730 | 727 | ||
731 | out_end_trans: | 728 | out_end_trans: |
732 | gfs2_trans_end(sdp); | 729 | gfs2_trans_end(sdp); |
733 | 730 | out_ipres: | |
734 | out_ipres: | ||
735 | if (nalloc) | 731 | if (nalloc) |
736 | gfs2_inplace_release(ip); | 732 | gfs2_inplace_release(ip); |
737 | 733 | out_alloc: | |
738 | out_alloc: | ||
739 | if (nalloc) | 734 | if (nalloc) |
740 | gfs2_alloc_put(ip); | 735 | gfs2_alloc_put(ip); |
741 | 736 | out_gunlock: | |
742 | out_gunlock: | ||
743 | gfs2_glock_dq_uninit(&i_gh); | 737 | gfs2_glock_dq_uninit(&i_gh); |
744 | 738 | out: | |
745 | out: | ||
746 | while (qx--) | 739 | while (qx--) |
747 | gfs2_glock_dq_uninit(&ghs[qx]); | 740 | gfs2_glock_dq_uninit(&ghs[qx]); |
748 | kfree(ghs); | 741 | kfree(ghs); |
749 | gfs2_log_flush(ip->i_gl->gl_sbd, ip->i_gl); | 742 | gfs2_log_flush(ip->i_gl->gl_sbd, ip->i_gl); |
750 | |||
751 | return error; | 743 | return error; |
752 | } | 744 | } |
753 | 745 | ||
@@ -764,7 +756,7 @@ static int do_glock(struct gfs2_quota_data *qd, int force_refresh, | |||
764 | struct gfs2_quota_lvb *qlvb; | 756 | struct gfs2_quota_lvb *qlvb; |
765 | 757 | ||
766 | file_ra_state_init(&ra_state, sdp->sd_quota_inode->i_mapping); | 758 | file_ra_state_init(&ra_state, sdp->sd_quota_inode->i_mapping); |
767 | restart: | 759 | restart: |
768 | error = gfs2_glock_nq_init(qd->qd_gl, LM_ST_SHARED, 0, q_gh); | 760 | error = gfs2_glock_nq_init(qd->qd_gl, LM_ST_SHARED, 0, q_gh); |
769 | if (error) | 761 | if (error) |
770 | return error; | 762 | return error; |
@@ -812,12 +804,10 @@ static int do_glock(struct gfs2_quota_data *qd, int force_refresh, | |||
812 | 804 | ||
813 | return 0; | 805 | return 0; |
814 | 806 | ||
815 | fail_gunlock: | 807 | fail_gunlock: |
816 | gfs2_glock_dq_uninit(&i_gh); | 808 | gfs2_glock_dq_uninit(&i_gh); |
817 | 809 | fail: | |
818 | fail: | ||
819 | gfs2_glock_dq_uninit(q_gh); | 810 | gfs2_glock_dq_uninit(q_gh); |
820 | |||
821 | return error; | 811 | return error; |
822 | } | 812 | } |
823 | 813 | ||
@@ -919,7 +909,7 @@ void gfs2_quota_unlock(struct gfs2_inode *ip) | |||
919 | qd_unlock(qda[x]); | 909 | qd_unlock(qda[x]); |
920 | } | 910 | } |
921 | 911 | ||
922 | out: | 912 | out: |
923 | gfs2_quota_unhold(ip); | 913 | gfs2_quota_unhold(ip); |
924 | } | 914 | } |
925 | 915 | ||
@@ -1098,9 +1088,8 @@ int gfs2_quota_read(struct gfs2_sbd *sdp, int user, uint32_t id, | |||
1098 | 1088 | ||
1099 | gfs2_glock_dq_uninit(&q_gh); | 1089 | gfs2_glock_dq_uninit(&q_gh); |
1100 | 1090 | ||
1101 | out: | 1091 | out: |
1102 | qd_put(qd); | 1092 | qd_put(qd); |
1103 | |||
1104 | return error; | 1093 | return error; |
1105 | } | 1094 | } |
1106 | #endif /* 0 */ | 1095 | #endif /* 0 */ |
@@ -1202,7 +1191,7 @@ int gfs2_quota_init(struct gfs2_sbd *sdp) | |||
1202 | 1191 | ||
1203 | return 0; | 1192 | return 0; |
1204 | 1193 | ||
1205 | fail: | 1194 | fail: |
1206 | gfs2_quota_cleanup(sdp); | 1195 | gfs2_quota_cleanup(sdp); |
1207 | return error; | 1196 | return error; |
1208 | } | 1197 | } |
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index e93066f930c1..520266c2044b 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -535,7 +535,7 @@ int gfs2_make_fs_rw(struct gfs2_sbd *sdp) | |||
535 | 535 | ||
536 | error = gfs2_quota_init(sdp); | 536 | error = gfs2_quota_init(sdp); |
537 | if (error) | 537 | if (error) |
538 | goto fail_unlinked; | 538 | goto fail; |
539 | 539 | ||
540 | set_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags); | 540 | set_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags); |
541 | 541 | ||
@@ -543,9 +543,7 @@ int gfs2_make_fs_rw(struct gfs2_sbd *sdp) | |||
543 | 543 | ||
544 | return 0; | 544 | return 0; |
545 | 545 | ||
546 | fail_unlinked: | 546 | fail: |
547 | |||
548 | fail: | ||
549 | t_gh.gh_flags |= GL_NOCACHE; | 547 | t_gh.gh_flags |= GL_NOCACHE; |
550 | gfs2_glock_dq_uninit(&t_gh); | 548 | gfs2_glock_dq_uninit(&t_gh); |
551 | 549 | ||
@@ -625,12 +623,10 @@ int gfs2_statfs_init(struct gfs2_sbd *sdp) | |||
625 | brelse(l_bh); | 623 | brelse(l_bh); |
626 | } | 624 | } |
627 | 625 | ||
628 | out_m_bh: | 626 | out_m_bh: |
629 | brelse(m_bh); | 627 | brelse(m_bh); |
630 | 628 | out: | |
631 | out: | ||
632 | gfs2_glock_dq_uninit(&gh); | 629 | gfs2_glock_dq_uninit(&gh); |
633 | |||
634 | return 0; | 630 | return 0; |
635 | } | 631 | } |
636 | 632 | ||
@@ -715,15 +711,12 @@ int gfs2_statfs_sync(struct gfs2_sbd *sdp) | |||
715 | 711 | ||
716 | gfs2_trans_end(sdp); | 712 | gfs2_trans_end(sdp); |
717 | 713 | ||
718 | out_bh2: | 714 | out_bh2: |
719 | brelse(l_bh); | 715 | brelse(l_bh); |
720 | 716 | out_bh: | |
721 | out_bh: | ||
722 | brelse(m_bh); | 717 | brelse(m_bh); |
723 | 718 | out: | |
724 | out: | ||
725 | gfs2_glock_dq_uninit(&gh); | 719 | gfs2_glock_dq_uninit(&gh); |
726 | |||
727 | return error; | 720 | return error; |
728 | } | 721 | } |
729 | 722 | ||
@@ -853,9 +846,8 @@ int gfs2_statfs_slow(struct gfs2_sbd *sdp, struct gfs2_statfs_change *sc) | |||
853 | 846 | ||
854 | gfs2_glock_dq_uninit(&ri_gh); | 847 | gfs2_glock_dq_uninit(&ri_gh); |
855 | 848 | ||
856 | out: | 849 | out: |
857 | kfree(gha); | 850 | kfree(gha); |
858 | |||
859 | return error; | 851 | return error; |
860 | } | 852 | } |
861 | 853 | ||
@@ -924,7 +916,7 @@ static int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp, | |||
924 | if (error) | 916 | if (error) |
925 | gfs2_glock_dq_uninit(t_gh); | 917 | gfs2_glock_dq_uninit(t_gh); |
926 | 918 | ||
927 | out: | 919 | out: |
928 | while (!list_empty(&list)) { | 920 | while (!list_empty(&list)) { |
929 | lfcc = list_entry(list.next, struct lfcc, list); | 921 | lfcc = list_entry(list.next, struct lfcc, list); |
930 | list_del(&lfcc->list); | 922 | list_del(&lfcc->list); |
@@ -932,7 +924,6 @@ static int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp, | |||
932 | kfree(lfcc); | 924 | kfree(lfcc); |
933 | } | 925 | } |
934 | gfs2_glock_dq_uninit(&ji_gh); | 926 | gfs2_glock_dq_uninit(&ji_gh); |
935 | |||
936 | return error; | 927 | return error; |
937 | } | 928 | } |
938 | 929 | ||
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index 3ffa88506c44..79199738c389 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c | |||
@@ -543,15 +543,15 @@ int gfs2_sys_fs_add(struct gfs2_sbd *sdp) | |||
543 | 543 | ||
544 | return 0; | 544 | return 0; |
545 | 545 | ||
546 | fail_args: | 546 | fail_args: |
547 | sysfs_remove_group(&sdp->sd_kobj, &args_group); | 547 | sysfs_remove_group(&sdp->sd_kobj, &args_group); |
548 | fail_counters: | 548 | fail_counters: |
549 | sysfs_remove_group(&sdp->sd_kobj, &counters_group); | 549 | sysfs_remove_group(&sdp->sd_kobj, &counters_group); |
550 | fail_lockstruct: | 550 | fail_lockstruct: |
551 | sysfs_remove_group(&sdp->sd_kobj, &lockstruct_group); | 551 | sysfs_remove_group(&sdp->sd_kobj, &lockstruct_group); |
552 | fail_reg: | 552 | fail_reg: |
553 | kobject_unregister(&sdp->sd_kobj); | 553 | kobject_unregister(&sdp->sd_kobj); |
554 | fail: | 554 | fail: |
555 | return error; | 555 | return error; |
556 | } | 556 | } |
557 | 557 | ||