]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/gfs2/quota.c
Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block
[linux-2.6-omap-h63xx.git] / fs / gfs2 / quota.c
index 6e546ee8f3d4d237e01f44aac67db0a35dc0f296..addb51e0f1353118267fff55ebe74f3d1a8f6eb9 100644 (file)
@@ -70,6 +70,7 @@ struct gfs2_quota_host {
        u64 qu_limit;
        u64 qu_warn;
        s64 qu_value;
+       u32 qu_ll_next;
 };
 
 struct gfs2_quota_change_host {
@@ -580,6 +581,7 @@ static void gfs2_quota_in(struct gfs2_quota_host *qu, const void *buf)
        qu->qu_limit = be64_to_cpu(str->qu_limit);
        qu->qu_warn = be64_to_cpu(str->qu_warn);
        qu->qu_value = be64_to_cpu(str->qu_value);
+       qu->qu_ll_next = be32_to_cpu(str->qu_ll_next);
 }
 
 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)
        str->qu_limit = cpu_to_be64(qu->qu_limit);
        str->qu_warn = cpu_to_be64(qu->qu_warn);
        str->qu_value = cpu_to_be64(qu->qu_value);
+       str->qu_ll_next = cpu_to_be32(qu->qu_ll_next);
        memset(&str->qu_reserved, 0, sizeof(str->qu_reserved));
 }
 
@@ -614,6 +617,16 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
        s64 value;
        int err = -EIO;
 
+       if (gfs2_is_stuffed(ip)) {
+               struct gfs2_alloc *al = NULL;
+               al = gfs2_alloc_get(ip);
+               /* just request 1 blk */
+               al->al_requested = 1;
+               gfs2_inplace_reserve(ip);
+               gfs2_unstuff_dinode(ip, NULL);
+               gfs2_inplace_release(ip);
+               gfs2_alloc_put(ip);
+       }
        page = grab_cache_page(mapping, index);
        if (!page)
                return -ENOMEM;