diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2008-03-10 15:34:50 +0000 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2008-03-31 10:41:36 +0100 |
commit | d82661d96993ac4efc1d54259ea85ffcd9b8bec6 (patch) | |
tree | 0a42b5a3ff34839673e0007fca4335f18078803a /fs/gfs2/ops_file.c | |
parent | 860b25d4a913a00331d333f8e207a088c7a1b84a (diff) | |
download | op-kernel-dev-d82661d96993ac4efc1d54259ea85ffcd9b8bec6.zip op-kernel-dev-d82661d96993ac4efc1d54259ea85ffcd9b8bec6.tar.gz |
[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_file.c')
-rw-r--r-- | fs/gfs2/ops_file.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c index 2b25a5f..e1b7d52 100644 --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c @@ -369,12 +369,9 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct page *page) if (al == NULL) goto out_unlock; - ret = gfs2_quota_lock(ip, NO_QUOTA_CHANGE, NO_QUOTA_CHANGE); + ret = gfs2_quota_lock_check(ip); if (ret) goto out_alloc_put; - ret = gfs2_quota_check(ip, ip->i_inode.i_uid, ip->i_inode.i_gid); - if (ret) - goto out_quota_unlock; al->al_requested = data_blocks + ind_blocks; ret = gfs2_inplace_reserve(ip); if (ret) |