Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0fd5355470ea40355b8af76d01748ec7b9926d4d
Commit:     0fd5355470ea40355b8af76d01748ec7b9926d4d
Parent:     5d35e31f43c4910d0b6afc5160728a84bbaf86f0
Author:     Abhijith Das <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 14 15:34:58 2007 -0500
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 08:55:22 2007 +0100

    [GFS2] Force unstuff of hidden quota inode
    
    This patch forcibly unstuffs (if stuffed) the hidden quota inode at the
    first availble opportunity. In any practical scenario the quota inode
    won't be stuffed, so this is ok to do. Unstuffing the quota inode allows
    us to ignore the case of a stuffed quota inode in gfs2_adjust_quota().
    
    Signed-off-by: Abhijith Das <[EMAIL PROTECTED]>
    Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/gfs2/quota.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 6e546ee..5dfa465 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -614,6 +614,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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to