summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/quota.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2013-01-31 21:56:13 -0800
committerEric W. Biederman <ebiederm@xmission.com>2013-02-13 06:15:10 -0800
commit6b24c0d279eacfb499854d09ea7f2b69d1721a29 (patch)
tree190918f71eb5867fdf755455153fd1e933e8a75a /fs/gfs2/quota.c
parent7c06b5d67225dc99ca81a33db3e055e08da857c3 (diff)
downloadop-kernel-dev-6b24c0d279eacfb499854d09ea7f2b69d1721a29.zip
op-kernel-dev-6b24c0d279eacfb499854d09ea7f2b69d1721a29.tar.gz
gfs2: Use uid_eq and gid_eq where appropriate
Where kuid_t values are compared use uid_eq and where kgid_t values are compared use gid_eq. This is unfortunately necessary because of the type safety that keeps someone from accidentally mixing kuids and kgids with other types. Cc: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/gfs2/quota.c')
-rw-r--r--fs/gfs2/quota.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 87f2740..afd2e5d 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -525,7 +525,8 @@ int gfs2_quota_hold(struct gfs2_inode *ip, kuid_t uid, kgid_t gid)
ip->i_res->rs_qa_qd_num++;
qd++;
- if (uid != NO_UID_QUOTA_CHANGE && uid != ip->i_inode.i_uid) {
+ if (!uid_eq(uid, NO_UID_QUOTA_CHANGE) &&
+ !uid_eq(uid, ip->i_inode.i_uid)) {
error = qdsb_get(sdp, make_kqid_uid(uid), qd);
if (error)
goto out;
@@ -533,7 +534,8 @@ int gfs2_quota_hold(struct gfs2_inode *ip, kuid_t uid, kgid_t gid)
qd++;
}
- if (gid != NO_GID_QUOTA_CHANGE && gid != ip->i_inode.i_gid) {
+ if (!gid_eq(gid, NO_GID_QUOTA_CHANGE) &&
+ !gid_eq(gid, ip->i_inode.i_gid)) {
error = qdsb_get(sdp, make_kqid_gid(gid), qd);
if (error)
goto out;
OpenPOWER on IntegriCloud