Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-block.git] / fs / gfs2 / aops.c
index 20dd33da92ded309ecfae28f68d2a419da914cb4..5551fea0afd7c53803314f524d4ceef84b59eaf3 100644 (file)
@@ -671,12 +671,12 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping,
 
        if (alloc_required) {
                struct gfs2_alloc_parms ap = { .aflags = 0, };
-               error = gfs2_quota_lock_check(ip);
+               requested = data_blocks + ind_blocks;
+               ap.target = requested;
+               error = gfs2_quota_lock_check(ip, &ap);
                if (error)
                        goto out_unlock;
 
-               requested = data_blocks + ind_blocks;
-               ap.target = requested;
                error = gfs2_inplace_reserve(ip, &ap);
                if (error)
                        goto out_qunlock;