diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-02-10 15:21:22 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-09-21 07:28:00 -0400 |
commit | 72235465864d84cedb2d9f26f8e1de824ee20339 (patch) | |
tree | bb33a1245140735a0bbeab6e895431b6965c7b1e /fs/ufs | |
parent | c2ba138a27ddac4abbc931599dbce907c868910a (diff) |
userns: Convert the ufs filesystem to use kuid/kgid where appropriate
Cc: Evgeniy Dushistov <dushistov@mail.ru>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'fs/ufs')
-rw-r--r-- | fs/ufs/inode.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index dd7c89d8a1c1..eb6d0b7dc879 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c | |||
@@ -597,8 +597,8 @@ static int ufs1_read_inode(struct inode *inode, struct ufs_inode *ufs_inode) | |||
597 | /* | 597 | /* |
598 | * Linux now has 32-bit uid and gid, so we can support EFT. | 598 | * Linux now has 32-bit uid and gid, so we can support EFT. |
599 | */ | 599 | */ |
600 | inode->i_uid = ufs_get_inode_uid(sb, ufs_inode); | 600 | i_uid_write(inode, ufs_get_inode_uid(sb, ufs_inode)); |
601 | inode->i_gid = ufs_get_inode_gid(sb, ufs_inode); | 601 | i_gid_write(inode, ufs_get_inode_gid(sb, ufs_inode)); |
602 | 602 | ||
603 | inode->i_size = fs64_to_cpu(sb, ufs_inode->ui_size); | 603 | inode->i_size = fs64_to_cpu(sb, ufs_inode->ui_size); |
604 | inode->i_atime.tv_sec = fs32_to_cpu(sb, ufs_inode->ui_atime.tv_sec); | 604 | inode->i_atime.tv_sec = fs32_to_cpu(sb, ufs_inode->ui_atime.tv_sec); |
@@ -645,8 +645,8 @@ static int ufs2_read_inode(struct inode *inode, struct ufs2_inode *ufs2_inode) | |||
645 | /* | 645 | /* |
646 | * Linux now has 32-bit uid and gid, so we can support EFT. | 646 | * Linux now has 32-bit uid and gid, so we can support EFT. |
647 | */ | 647 | */ |
648 | inode->i_uid = fs32_to_cpu(sb, ufs2_inode->ui_uid); | 648 | i_uid_write(inode, fs32_to_cpu(sb, ufs2_inode->ui_uid)); |
649 | inode->i_gid = fs32_to_cpu(sb, ufs2_inode->ui_gid); | 649 | i_gid_write(inode, fs32_to_cpu(sb, ufs2_inode->ui_gid)); |
650 | 650 | ||
651 | inode->i_size = fs64_to_cpu(sb, ufs2_inode->ui_size); | 651 | inode->i_size = fs64_to_cpu(sb, ufs2_inode->ui_size); |
652 | inode->i_atime.tv_sec = fs64_to_cpu(sb, ufs2_inode->ui_atime); | 652 | inode->i_atime.tv_sec = fs64_to_cpu(sb, ufs2_inode->ui_atime); |
@@ -745,8 +745,8 @@ static void ufs1_update_inode(struct inode *inode, struct ufs_inode *ufs_inode) | |||
745 | ufs_inode->ui_mode = cpu_to_fs16(sb, inode->i_mode); | 745 | ufs_inode->ui_mode = cpu_to_fs16(sb, inode->i_mode); |
746 | ufs_inode->ui_nlink = cpu_to_fs16(sb, inode->i_nlink); | 746 | ufs_inode->ui_nlink = cpu_to_fs16(sb, inode->i_nlink); |
747 | 747 | ||
748 | ufs_set_inode_uid(sb, ufs_inode, inode->i_uid); | 748 | ufs_set_inode_uid(sb, ufs_inode, i_uid_read(inode)); |
749 | ufs_set_inode_gid(sb, ufs_inode, inode->i_gid); | 749 | ufs_set_inode_gid(sb, ufs_inode, i_gid_read(inode)); |
750 | 750 | ||
751 | ufs_inode->ui_size = cpu_to_fs64(sb, inode->i_size); | 751 | ufs_inode->ui_size = cpu_to_fs64(sb, inode->i_size); |
752 | ufs_inode->ui_atime.tv_sec = cpu_to_fs32(sb, inode->i_atime.tv_sec); | 752 | ufs_inode->ui_atime.tv_sec = cpu_to_fs32(sb, inode->i_atime.tv_sec); |
@@ -789,8 +789,8 @@ static void ufs2_update_inode(struct inode *inode, struct ufs2_inode *ufs_inode) | |||
789 | ufs_inode->ui_mode = cpu_to_fs16(sb, inode->i_mode); | 789 | ufs_inode->ui_mode = cpu_to_fs16(sb, inode->i_mode); |
790 | ufs_inode->ui_nlink = cpu_to_fs16(sb, inode->i_nlink); | 790 | ufs_inode->ui_nlink = cpu_to_fs16(sb, inode->i_nlink); |
791 | 791 | ||
792 | ufs_inode->ui_uid = cpu_to_fs32(sb, inode->i_uid); | 792 | ufs_inode->ui_uid = cpu_to_fs32(sb, i_uid_read(inode)); |
793 | ufs_inode->ui_gid = cpu_to_fs32(sb, inode->i_gid); | 793 | ufs_inode->ui_gid = cpu_to_fs32(sb, i_gid_read(inode)); |
794 | 794 | ||
795 | ufs_inode->ui_size = cpu_to_fs64(sb, inode->i_size); | 795 | ufs_inode->ui_size = cpu_to_fs64(sb, inode->i_size); |
796 | ufs_inode->ui_atime = cpu_to_fs64(sb, inode->i_atime.tv_sec); | 796 | ufs_inode->ui_atime = cpu_to_fs64(sb, inode->i_atime.tv_sec); |