diff options
Diffstat (limited to 'fs/gfs2/quota.c')
-rw-r--r-- | fs/gfs2/quota.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 6e546ee8f3d4..addb51e0f135 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c | |||
@@ -70,6 +70,7 @@ struct gfs2_quota_host { | |||
70 | u64 qu_limit; | 70 | u64 qu_limit; |
71 | u64 qu_warn; | 71 | u64 qu_warn; |
72 | s64 qu_value; | 72 | s64 qu_value; |
73 | u32 qu_ll_next; | ||
73 | }; | 74 | }; |
74 | 75 | ||
75 | struct gfs2_quota_change_host { | 76 | struct gfs2_quota_change_host { |
@@ -580,6 +581,7 @@ static void gfs2_quota_in(struct gfs2_quota_host *qu, const void *buf) | |||
580 | qu->qu_limit = be64_to_cpu(str->qu_limit); | 581 | qu->qu_limit = be64_to_cpu(str->qu_limit); |
581 | qu->qu_warn = be64_to_cpu(str->qu_warn); | 582 | qu->qu_warn = be64_to_cpu(str->qu_warn); |
582 | qu->qu_value = be64_to_cpu(str->qu_value); | 583 | qu->qu_value = be64_to_cpu(str->qu_value); |
584 | qu->qu_ll_next = be32_to_cpu(str->qu_ll_next); | ||
583 | } | 585 | } |
584 | 586 | ||
585 | static void gfs2_quota_out(const struct gfs2_quota_host *qu, void *buf) | 587 | static void gfs2_quota_out(const struct gfs2_quota_host *qu, void *buf) |
@@ -589,6 +591,7 @@ static void gfs2_quota_out(const struct gfs2_quota_host *qu, void *buf) | |||
589 | str->qu_limit = cpu_to_be64(qu->qu_limit); | 591 | str->qu_limit = cpu_to_be64(qu->qu_limit); |
590 | str->qu_warn = cpu_to_be64(qu->qu_warn); | 592 | str->qu_warn = cpu_to_be64(qu->qu_warn); |
591 | str->qu_value = cpu_to_be64(qu->qu_value); | 593 | str->qu_value = cpu_to_be64(qu->qu_value); |
594 | str->qu_ll_next = cpu_to_be32(qu->qu_ll_next); | ||
592 | memset(&str->qu_reserved, 0, sizeof(str->qu_reserved)); | 595 | memset(&str->qu_reserved, 0, sizeof(str->qu_reserved)); |
593 | } | 596 | } |
594 | 597 | ||
@@ -614,6 +617,16 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc, | |||
614 | s64 value; | 617 | s64 value; |
615 | int err = -EIO; | 618 | int err = -EIO; |
616 | 619 | ||
620 | if (gfs2_is_stuffed(ip)) { | ||
621 | struct gfs2_alloc *al = NULL; | ||
622 | al = gfs2_alloc_get(ip); | ||
623 | /* just request 1 blk */ | ||
624 | al->al_requested = 1; | ||
625 | gfs2_inplace_reserve(ip); | ||
626 | gfs2_unstuff_dinode(ip, NULL); | ||
627 | gfs2_inplace_release(ip); | ||
628 | gfs2_alloc_put(ip); | ||
629 | } | ||
617 | page = grab_cache_page(mapping, index); | 630 | page = grab_cache_page(mapping, index); |
618 | if (!page) | 631 | if (!page) |
619 | return -ENOMEM; | 632 | return -ENOMEM; |