diff options
-rw-r--r-- | fs/gfs2/bmap.c | 2 | ||||
-rw-r--r-- | fs/gfs2/rgrp.c | 16 | ||||
-rw-r--r-- | fs/gfs2/rgrp.h | 2 | ||||
-rw-r--r-- | fs/gfs2/super.c | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 5e83657f046e..1dc9a13ce6bb 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
@@ -787,7 +787,7 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh, | |||
787 | goto out_rlist; | 787 | goto out_rlist; |
788 | 788 | ||
789 | if (gfs2_rs_active(ip->i_res)) /* needs to be done with the rgrp glock held */ | 789 | if (gfs2_rs_active(ip->i_res)) /* needs to be done with the rgrp glock held */ |
790 | gfs2_rs_deltree(ip, ip->i_res); | 790 | gfs2_rs_deltree(ip->i_res); |
791 | 791 | ||
792 | error = gfs2_trans_begin(sdp, rg_blocks + RES_DINODE + | 792 | error = gfs2_trans_begin(sdp, rg_blocks + RES_DINODE + |
793 | RES_INDIRECT + RES_STATFS + RES_QUOTA, | 793 | RES_INDIRECT + RES_STATFS + RES_QUOTA, |
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 71c7fc523d70..0c5a575b513e 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -592,7 +592,7 @@ static void dump_rs(struct seq_file *seq, const struct gfs2_blkreserv *rs) | |||
592 | * @rs: The reservation to remove | 592 | * @rs: The reservation to remove |
593 | * | 593 | * |
594 | */ | 594 | */ |
595 | static void __rs_deltree(struct gfs2_inode *ip, struct gfs2_blkreserv *rs) | 595 | static void __rs_deltree(struct gfs2_blkreserv *rs) |
596 | { | 596 | { |
597 | struct gfs2_rgrpd *rgd; | 597 | struct gfs2_rgrpd *rgd; |
598 | 598 | ||
@@ -605,7 +605,7 @@ static void __rs_deltree(struct gfs2_inode *ip, struct gfs2_blkreserv *rs) | |||
605 | RB_CLEAR_NODE(&rs->rs_node); | 605 | RB_CLEAR_NODE(&rs->rs_node); |
606 | 606 | ||
607 | if (rs->rs_free) { | 607 | if (rs->rs_free) { |
608 | /* return reserved blocks to the rgrp and the ip */ | 608 | /* return reserved blocks to the rgrp */ |
609 | BUG_ON(rs->rs_rbm.rgd->rd_reserved < rs->rs_free); | 609 | BUG_ON(rs->rs_rbm.rgd->rd_reserved < rs->rs_free); |
610 | rs->rs_rbm.rgd->rd_reserved -= rs->rs_free; | 610 | rs->rs_rbm.rgd->rd_reserved -= rs->rs_free; |
611 | rs->rs_free = 0; | 611 | rs->rs_free = 0; |
@@ -619,14 +619,14 @@ static void __rs_deltree(struct gfs2_inode *ip, struct gfs2_blkreserv *rs) | |||
619 | * @rs: The reservation to remove | 619 | * @rs: The reservation to remove |
620 | * | 620 | * |
621 | */ | 621 | */ |
622 | void gfs2_rs_deltree(struct gfs2_inode *ip, struct gfs2_blkreserv *rs) | 622 | void gfs2_rs_deltree(struct gfs2_blkreserv *rs) |
623 | { | 623 | { |
624 | struct gfs2_rgrpd *rgd; | 624 | struct gfs2_rgrpd *rgd; |
625 | 625 | ||
626 | rgd = rs->rs_rbm.rgd; | 626 | rgd = rs->rs_rbm.rgd; |
627 | if (rgd) { | 627 | if (rgd) { |
628 | spin_lock(&rgd->rd_rsspin); | 628 | spin_lock(&rgd->rd_rsspin); |
629 | __rs_deltree(ip, rs); | 629 | __rs_deltree(rs); |
630 | spin_unlock(&rgd->rd_rsspin); | 630 | spin_unlock(&rgd->rd_rsspin); |
631 | } | 631 | } |
632 | } | 632 | } |
@@ -640,7 +640,7 @@ void gfs2_rs_delete(struct gfs2_inode *ip) | |||
640 | { | 640 | { |
641 | down_write(&ip->i_rw_mutex); | 641 | down_write(&ip->i_rw_mutex); |
642 | if (ip->i_res) { | 642 | if (ip->i_res) { |
643 | gfs2_rs_deltree(ip, ip->i_res); | 643 | gfs2_rs_deltree(ip->i_res); |
644 | BUG_ON(ip->i_res->rs_free); | 644 | BUG_ON(ip->i_res->rs_free); |
645 | kmem_cache_free(gfs2_rsrv_cachep, ip->i_res); | 645 | kmem_cache_free(gfs2_rsrv_cachep, ip->i_res); |
646 | ip->i_res = NULL; | 646 | ip->i_res = NULL; |
@@ -664,7 +664,7 @@ static void return_all_reservations(struct gfs2_rgrpd *rgd) | |||
664 | spin_lock(&rgd->rd_rsspin); | 664 | spin_lock(&rgd->rd_rsspin); |
665 | while ((n = rb_first(&rgd->rd_rstree))) { | 665 | while ((n = rb_first(&rgd->rd_rstree))) { |
666 | rs = rb_entry(n, struct gfs2_blkreserv, rs_node); | 666 | rs = rb_entry(n, struct gfs2_blkreserv, rs_node); |
667 | __rs_deltree(NULL, rs); | 667 | __rs_deltree(rs); |
668 | } | 668 | } |
669 | spin_unlock(&rgd->rd_rsspin); | 669 | spin_unlock(&rgd->rd_rsspin); |
670 | } | 670 | } |
@@ -1874,7 +1874,7 @@ int gfs2_inplace_reserve(struct gfs2_inode *ip, u32 requested, u32 aflags) | |||
1874 | 1874 | ||
1875 | /* Drop reservation, if we couldn't use reserved rgrp */ | 1875 | /* Drop reservation, if we couldn't use reserved rgrp */ |
1876 | if (gfs2_rs_active(rs)) | 1876 | if (gfs2_rs_active(rs)) |
1877 | gfs2_rs_deltree(ip, rs); | 1877 | gfs2_rs_deltree(rs); |
1878 | check_rgrp: | 1878 | check_rgrp: |
1879 | /* Check for unlinked inodes which can be reclaimed */ | 1879 | /* Check for unlinked inodes which can be reclaimed */ |
1880 | if (rs->rs_rbm.rgd->rd_flags & GFS2_RDF_CHECK) | 1880 | if (rs->rs_rbm.rgd->rd_flags & GFS2_RDF_CHECK) |
@@ -2087,7 +2087,7 @@ static void gfs2_adjust_reservation(struct gfs2_inode *ip, | |||
2087 | if (rs->rs_free && !ret) | 2087 | if (rs->rs_free && !ret) |
2088 | goto out; | 2088 | goto out; |
2089 | } | 2089 | } |
2090 | __rs_deltree(ip, rs); | 2090 | __rs_deltree(rs); |
2091 | } | 2091 | } |
2092 | out: | 2092 | out: |
2093 | spin_unlock(&rgd->rd_rsspin); | 2093 | spin_unlock(&rgd->rd_rsspin); |
diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h index 842185853f6b..5b3f4a896e6c 100644 --- a/fs/gfs2/rgrp.h +++ b/fs/gfs2/rgrp.h | |||
@@ -47,7 +47,7 @@ extern int gfs2_alloc_blocks(struct gfs2_inode *ip, u64 *bn, unsigned int *n, | |||
47 | bool dinode, u64 *generation); | 47 | bool dinode, u64 *generation); |
48 | 48 | ||
49 | extern int gfs2_rs_alloc(struct gfs2_inode *ip); | 49 | extern int gfs2_rs_alloc(struct gfs2_inode *ip); |
50 | extern void gfs2_rs_deltree(struct gfs2_inode *ip, struct gfs2_blkreserv *rs); | 50 | extern void gfs2_rs_deltree(struct gfs2_blkreserv *rs); |
51 | extern void gfs2_rs_delete(struct gfs2_inode *ip); | 51 | extern void gfs2_rs_delete(struct gfs2_inode *ip); |
52 | extern void __gfs2_free_blocks(struct gfs2_inode *ip, u64 bstart, u32 blen, int meta); | 52 | extern void __gfs2_free_blocks(struct gfs2_inode *ip, u64 bstart, u32 blen, int meta); |
53 | extern void gfs2_free_meta(struct gfs2_inode *ip, u64 bstart, u32 blen); | 53 | extern void gfs2_free_meta(struct gfs2_inode *ip, u64 bstart, u32 blen); |
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index cab77b8ba84f..917c8e1eb4ae 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -1512,7 +1512,7 @@ out_truncate: | |||
1512 | out_unlock: | 1512 | out_unlock: |
1513 | /* Error path for case 1 */ | 1513 | /* Error path for case 1 */ |
1514 | if (gfs2_rs_active(ip->i_res)) | 1514 | if (gfs2_rs_active(ip->i_res)) |
1515 | gfs2_rs_deltree(ip, ip->i_res); | 1515 | gfs2_rs_deltree(ip->i_res); |
1516 | 1516 | ||
1517 | if (test_bit(HIF_HOLDER, &ip->i_iopen_gh.gh_iflags)) | 1517 | if (test_bit(HIF_HOLDER, &ip->i_iopen_gh.gh_iflags)) |
1518 | gfs2_glock_dq(&ip->i_iopen_gh); | 1518 | gfs2_glock_dq(&ip->i_iopen_gh); |