aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/bmap.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2008-03-10 11:34:50 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2008-03-31 05:41:36 -0400
commitd82661d96993ac4efc1d54259ea85ffcd9b8bec6 (patch)
tree0a42b5a3ff34839673e0007fca4335f18078803a /fs/gfs2/bmap.c
parent860b25d4a913a00331d333f8e207a088c7a1b84a (diff)
[GFS2] Streamline quota lock/check for no-quota case
This patch streamlines the quota checking in the "no quota" case by making the check inline in the calling function, thus reducing the number of function calls. Eventually we might be able to remove the checks from the gfs2_quota_lock() and gfs2_quota_check() functions, but currently we can't as there are a very few places in the code which need to call these functions directly still. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Cc: Abhijith Das <adas@redhat.com>
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r--fs/gfs2/bmap.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index f7093aa69aae..c19184f2e70e 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -903,14 +903,10 @@ static int do_grow(struct gfs2_inode *ip, u64 size)
903 if (!al) 903 if (!al)
904 return -ENOMEM; 904 return -ENOMEM;
905 905
906 error = gfs2_quota_lock(ip, NO_QUOTA_CHANGE, NO_QUOTA_CHANGE); 906 error = gfs2_quota_lock_check(ip);
907 if (error) 907 if (error)
908 goto out; 908 goto out;
909 909
910 error = gfs2_quota_check(ip, ip->i_inode.i_uid, ip->i_inode.i_gid);
911 if (error)
912 goto out_gunlock_q;
913
914 al->al_requested = sdp->sd_max_height + RES_DATA; 910 al->al_requested = sdp->sd_max_height + RES_DATA;
915 911
916 error = gfs2_inplace_reserve(ip); 912 error = gfs2_inplace_reserve(ip);