From a097dc7e24cba7980bc5e2df461a4ef228e97e59 Mon Sep 17 00:00:00 2001 From: Bob Peterson Date: Thu, 16 Jul 2015 08:28:04 -0500 Subject: GFS2: Make rgrp reservations part of the gfs2_inode structure Before this patch, multi-block reservation structures were allocated from a special slab. This patch folds the structure into the gfs2_inode structure. The disadvantage is that the gfs2_inode needs more memory, even when a file is opened read-only. The advantages are: (a) we don't need the special slab and the extra time it takes to allocate and deallocate from it. (b) we no longer need to worry that the structure exists for things like quota management. (c) This also allows us to remove the calls to get_write_access and put_write_access since we know the structure will exist. Signed-off-by: Bob Peterson --- fs/gfs2/inode.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'fs/gfs2/inode.c') diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index c37e6bf2958e..a8ce2e99cf5d 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -1859,10 +1859,6 @@ static int setattr_chown(struct inode *inode, struct iattr *attr) if (!(attr->ia_valid & ATTR_GID) || gid_eq(ogid, ngid)) ogid = ngid = NO_GID_QUOTA_CHANGE; - error = get_write_access(inode); - if (error) - return error; - error = gfs2_rsqa_alloc(ip); if (error) goto out; @@ -1903,7 +1899,6 @@ out_end_trans: out_gunlock_q: gfs2_quota_unlock(ip); out: - put_write_access(inode); return error; } -- cgit v1.2.1