summaryrefslogtreecommitdiffstats
path: root/fs/hpfs/namei.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-02-08 01:27:53 +0100
committerEric W. Biederman <ebiederm@xmission.com>2012-09-21 12:13:32 +0200
commit0e1a43c71612cd0b6b50da03040c85fbf3d24211 (patch)
tree3287a4782caa59dbcb6e922835d056724759b9ff /fs/hpfs/namei.c
parentuserns: Convert btrfs to use kuid/kgid where appropriate (diff)
downloadlinux-0e1a43c71612cd0b6b50da03040c85fbf3d24211.tar.xz
linux-0e1a43c71612cd0b6b50da03040c85fbf3d24211.zip
userns: Convert hpfs to use kuid and kgid where appropriate
Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'fs/hpfs/namei.c')
-rw-r--r--fs/hpfs/namei.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c
index bc9082482f68..345713d2f8f3 100644
--- a/fs/hpfs/namei.c
+++ b/fs/hpfs/namei.c
@@ -91,8 +91,8 @@ static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
inc_nlink(dir);
insert_inode_hash(result);
- if (result->i_uid != current_fsuid() ||
- result->i_gid != current_fsgid() ||
+ if (!uid_eq(result->i_uid, current_fsuid()) ||
+ !gid_eq(result->i_gid, current_fsgid()) ||
result->i_mode != (mode | S_IFDIR)) {
result->i_uid = current_fsuid();
result->i_gid = current_fsgid();
@@ -179,8 +179,8 @@ static int hpfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, b
insert_inode_hash(result);
- if (result->i_uid != current_fsuid() ||
- result->i_gid != current_fsgid() ||
+ if (!uid_eq(result->i_uid, current_fsuid()) ||
+ !gid_eq(result->i_gid, current_fsgid()) ||
result->i_mode != (mode | S_IFREG)) {
result->i_uid = current_fsuid();
result->i_gid = current_fsgid();