summaryrefslogtreecommitdiff
path: root/fs/ocfs2/refcounttree.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2013-02-01 05:35:29 +0400
committerEric W. Biederman <ebiederm@xmission.com>2013-02-13 18:01:00 +0400
commit488c8ef033c6409cd8d23bcd04eed2f56301836d (patch)
tree326d12ee8aac206c72fe65ede9c7f92ac97073f9 /fs/ocfs2/refcounttree.c
parentba6135609c2b56851e37e1d89ddbdbae4e774a71 (diff)
downloadlinux-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
index 30a055049e16..934a4ac3e7fc 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;