aboutsummaryrefslogtreecommitdiffstats
path: root/fs/minix
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-02-10 14:45:03 -0500
committerEric W. Biederman <ebiederm@xmission.com>2012-09-21 06:13:14 -0400
commitf303bdc55e9e74890eadc836c1edd8b5c21a7b89 (patch)
tree17e476a7131aac4ab69a12ed12397b0ed03919e5 /fs/minix
parent1a0a994ebe851206d02469782da6c1f9a0547d7d (diff)
userns: Convert minix to use kuid/kgid where appropriate
Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'fs/minix')
-rw-r--r--fs/minix/inode.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/minix/inode.c b/fs/minix/inode.c
index 2a503ad020d5..d0e42c678923 100644
--- a/fs/minix/inode.c
+++ b/fs/minix/inode.c
@@ -460,8 +460,8 @@ static struct inode *V1_minix_iget(struct inode *inode)
460 return ERR_PTR(-EIO); 460 return ERR_PTR(-EIO);
461 } 461 }
462 inode->i_mode = raw_inode->i_mode; 462 inode->i_mode = raw_inode->i_mode;
463 inode->i_uid = (uid_t)raw_inode->i_uid; 463 i_uid_write(inode, raw_inode->i_uid);
464 inode->i_gid = (gid_t)raw_inode->i_gid; 464 i_gid_write(inode, raw_inode->i_gid);
465 set_nlink(inode, raw_inode->i_nlinks); 465 set_nlink(inode, raw_inode->i_nlinks);
466 inode->i_size = raw_inode->i_size; 466 inode->i_size = raw_inode->i_size;
467 inode->i_mtime.tv_sec = inode->i_atime.tv_sec = inode->i_ctime.tv_sec = raw_inode->i_time; 467 inode->i_mtime.tv_sec = inode->i_atime.tv_sec = inode->i_ctime.tv_sec = raw_inode->i_time;
@@ -493,8 +493,8 @@ static struct inode *V2_minix_iget(struct inode *inode)
493 return ERR_PTR(-EIO); 493 return ERR_PTR(-EIO);
494 } 494 }
495 inode->i_mode = raw_inode->i_mode; 495 inode->i_mode = raw_inode->i_mode;
496 inode->i_uid = (uid_t)raw_inode->i_uid; 496 i_uid_write(inode, raw_inode->i_uid);
497 inode->i_gid = (gid_t)raw_inode->i_gid; 497 i_gid_write(inode, raw_inode->i_gid);
498 set_nlink(inode, raw_inode->i_nlinks); 498 set_nlink(inode, raw_inode->i_nlinks);
499 inode->i_size = raw_inode->i_size; 499 inode->i_size = raw_inode->i_size;
500 inode->i_mtime.tv_sec = raw_inode->i_mtime; 500 inode->i_mtime.tv_sec = raw_inode->i_mtime;
@@ -545,8 +545,8 @@ static struct buffer_head * V1_minix_update_inode(struct inode * inode)
545 if (!raw_inode) 545 if (!raw_inode)
546 return NULL; 546 return NULL;
547 raw_inode->i_mode = inode->i_mode; 547 raw_inode->i_mode = inode->i_mode;
548 raw_inode->i_uid = fs_high2lowuid(inode->i_uid); 548 raw_inode->i_uid = fs_high2lowuid(i_uid_read(inode));
549 raw_inode->i_gid = fs_high2lowgid(inode->i_gid); 549 raw_inode->i_gid = fs_high2lowgid(i_gid_read(inode));
550 raw_inode->i_nlinks = inode->i_nlink; 550 raw_inode->i_nlinks = inode->i_nlink;
551 raw_inode->i_size = inode->i_size; 551 raw_inode->i_size = inode->i_size;
552 raw_inode->i_time = inode->i_mtime.tv_sec; 552 raw_inode->i_time = inode->i_mtime.tv_sec;
@@ -572,8 +572,8 @@ static struct buffer_head * V2_minix_update_inode(struct inode * inode)
572 if (!raw_inode) 572 if (!raw_inode)
573 return NULL; 573 return NULL;
574 raw_inode->i_mode = inode->i_mode; 574 raw_inode->i_mode = inode->i_mode;
575 raw_inode->i_uid = fs_high2lowuid(inode->i_uid); 575 raw_inode->i_uid = fs_high2lowuid(i_uid_read(inode));
576 raw_inode->i_gid = fs_high2lowgid(inode->i_gid); 576 raw_inode->i_gid = fs_high2lowgid(i_gid_read(inode));
577 raw_inode->i_nlinks = inode->i_nlink; 577 raw_inode->i_nlinks = inode->i_nlink;
578 raw_inode->i_size = inode->i_size; 578 raw_inode->i_size = inode->i_size;
579 raw_inode->i_mtime = inode->i_mtime.tv_sec; 579 raw_inode->i_mtime = inode->i_mtime.tv_sec;