diff options
author | Steven Whitehouse | 2008-03-10 16:34:50 +0100 |
---|---|---|
committer | Steven Whitehouse | 2008-03-31 11:41:36 +0200 |
commit | d82661d96993ac4efc1d54259ea85ffcd9b8bec6 (patch) | |
tree | 0a42b5a3ff34839673e0007fca4335f18078803a /fs/gfs2/ops_address.c | |
parent | [GFS2] Remove drop of module ref where not needed (diff) | |
download | kernel-qcow2-linux-d82661d96993ac4efc1d54259ea85ffcd9b8bec6.tar.gz kernel-qcow2-linux-d82661d96993ac4efc1d54259ea85ffcd9b8bec6.tar.xz kernel-qcow2-linux-d82661d96993ac4efc1d54259ea85ffcd9b8bec6.zip |
[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/ops_address.c')
-rw-r--r-- | fs/gfs2/ops_address.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index e72fd47d71eb..90a04a6e3789 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c @@ -653,14 +653,10 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping, goto out_unlock; } - error = gfs2_quota_lock(ip, NO_QUOTA_CHANGE, NO_QUOTA_CHANGE); + error = gfs2_quota_lock_check(ip); if (error) goto out_alloc_put; - error = gfs2_quota_check(ip, ip->i_inode.i_uid, ip->i_inode.i_gid); - if (error) - goto out_qunlock; - al->al_requested = data_blocks + ind_blocks; error = gfs2_inplace_reserve(ip); if (error) |