diff options
author | Mark Brown <broonie@linaro.org> | 2014-01-27 14:57:25 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-01-27 14:57:25 +0000 |
commit | 51ad557e21b8713f3abc286c14bca4ed01b8e56d (patch) | |
tree | 357ddab632db8023c5b534309269b20fd50346e3 /fs/gfs2/inode.c | |
parent | 9d069f462c65190c5116e750e7b376793cd32a15 (diff) | |
parent | 020abbc91120ddf052e2c303a8c598c3be4dc459 (diff) |
Merge tag 'v3.10.28' into linux-linaro-lsklsk-14.01
This is the 3.10.28 stable release
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r-- | fs/gfs2/inode.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 62b484e4a9e4..bc5dac400125 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -1536,10 +1536,22 @@ 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 = gfs2_quota_lock(ip, nuid, ngid); + error = get_write_access(inode); if (error) return error; + error = gfs2_rs_alloc(ip); + if (error) + goto out; + + error = gfs2_rindex_update(sdp); + if (error) + goto out; + + error = gfs2_quota_lock(ip, nuid, ngid); + if (error) + goto out; + if (!uid_eq(ouid, NO_UID_QUOTA_CHANGE) || !gid_eq(ogid, NO_GID_QUOTA_CHANGE)) { error = gfs2_quota_check(ip, nuid, ngid); @@ -1566,6 +1578,8 @@ out_end_trans: gfs2_trans_end(sdp); out_gunlock_q: gfs2_quota_unlock(ip); +out: + put_write_access(inode); return error; } |