Skip to content

Commit

Permalink
[GFS2] Force unstuff of hidden quota inode
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Abhijith Das authored and swhiteho committed Oct 10, 2007
1 parent 5d35e31 commit 0fd5355
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fs/gfs2/quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0fd5355

Please sign in to comment.