diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-01 01:35:29 (GMT) |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-13 14:01:00 (GMT) |
commit | 488c8ef033c6409cd8d23bcd04eed2f56301836d (patch) | |
tree | 326d12ee8aac206c72fe65ede9c7f92ac97073f9 /fs/ocfs2/refcounttree.c | |
parent | ba6135609c2b56851e37e1d89ddbdbae4e774a71 (diff) | |
download | linux-fsl-qoriq-488c8ef033c6409cd8d23bcd04eed2f56301836d.tar.xz |
ocfs2: Compare kuids and kgids using uid_eq and gid_eq
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/ocfs2/refcounttree.c')
-rw-r--r-- | fs/ocfs2/refcounttree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 30a0550..934a4ac 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c @@ -4407,7 +4407,7 @@ static int ocfs2_vfs_reflink(struct dentry *old_dentry, struct inode *dir, * rights to do so. */ if (preserve) { - if ((current_fsuid() != inode->i_uid) && !capable(CAP_CHOWN)) + if (!uid_eq(current_fsuid(), inode->i_uid) && !capable(CAP_CHOWN)) return -EPERM; if (!in_group_p(inode->i_gid) && !capable(CAP_CHOWN)) return -EPERM; |