diff options
Diffstat (limited to 'fs/gfs2/ops_inode.c')
-rw-r--r-- | fs/gfs2/ops_inode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index e87412902bed..301c94596678 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c | |||
@@ -981,8 +981,9 @@ static int setattr_chown(struct inode *inode, struct iattr *attr) | |||
981 | brelse(dibh); | 981 | brelse(dibh); |
982 | 982 | ||
983 | if (ouid != NO_QUOTA_CHANGE || ogid != NO_QUOTA_CHANGE) { | 983 | if (ouid != NO_QUOTA_CHANGE || ogid != NO_QUOTA_CHANGE) { |
984 | gfs2_quota_change(ip, -ip->i_di.di_blocks, ouid, ogid); | 984 | u64 blocks = gfs2_get_inode_blocks(&ip->i_inode); |
985 | gfs2_quota_change(ip, ip->i_di.di_blocks, nuid, ngid); | 985 | gfs2_quota_change(ip, -blocks, ouid, ogid); |
986 | gfs2_quota_change(ip, blocks, nuid, ngid); | ||
986 | } | 987 | } |
987 | 988 | ||
988 | out_end_trans: | 989 | out_end_trans: |