Commit a726ecce authored by Eric W. Biederman's avatar Eric W. Biederman

userns: Convert the sysv filesystem to use kuid/kgid where appropriate

Cc: Christoph Hellwig <hch@infradead.org>
Acked-by: default avatarSerge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
parent 85a03d1b
...@@ -202,8 +202,8 @@ struct inode *sysv_iget(struct super_block *sb, unsigned int ino) ...@@ -202,8 +202,8 @@ struct inode *sysv_iget(struct super_block *sb, unsigned int ino)
} }
/* SystemV FS: kludge permissions if ino==SYSV_ROOT_INO ?? */ /* SystemV FS: kludge permissions if ino==SYSV_ROOT_INO ?? */
inode->i_mode = fs16_to_cpu(sbi, raw_inode->i_mode); inode->i_mode = fs16_to_cpu(sbi, raw_inode->i_mode);
inode->i_uid = (uid_t)fs16_to_cpu(sbi, raw_inode->i_uid); i_uid_write(inode, (uid_t)fs16_to_cpu(sbi, raw_inode->i_uid));
inode->i_gid = (gid_t)fs16_to_cpu(sbi, raw_inode->i_gid); i_gid_write(inode, (gid_t)fs16_to_cpu(sbi, raw_inode->i_gid));
set_nlink(inode, fs16_to_cpu(sbi, raw_inode->i_nlink)); set_nlink(inode, fs16_to_cpu(sbi, raw_inode->i_nlink));
inode->i_size = fs32_to_cpu(sbi, raw_inode->i_size); inode->i_size = fs32_to_cpu(sbi, raw_inode->i_size);
inode->i_atime.tv_sec = fs32_to_cpu(sbi, raw_inode->i_atime); inode->i_atime.tv_sec = fs32_to_cpu(sbi, raw_inode->i_atime);
...@@ -256,8 +256,8 @@ static int __sysv_write_inode(struct inode *inode, int wait) ...@@ -256,8 +256,8 @@ static int __sysv_write_inode(struct inode *inode, int wait)
} }
raw_inode->i_mode = cpu_to_fs16(sbi, inode->i_mode); raw_inode->i_mode = cpu_to_fs16(sbi, inode->i_mode);
raw_inode->i_uid = cpu_to_fs16(sbi, fs_high2lowuid(inode->i_uid)); raw_inode->i_uid = cpu_to_fs16(sbi, fs_high2lowuid(i_uid_read(inode)));
raw_inode->i_gid = cpu_to_fs16(sbi, fs_high2lowgid(inode->i_gid)); raw_inode->i_gid = cpu_to_fs16(sbi, fs_high2lowgid(i_gid_read(inode)));
raw_inode->i_nlink = cpu_to_fs16(sbi, inode->i_nlink); raw_inode->i_nlink = cpu_to_fs16(sbi, inode->i_nlink);
raw_inode->i_size = cpu_to_fs32(sbi, inode->i_size); raw_inode->i_size = cpu_to_fs32(sbi, inode->i_size);
raw_inode->i_atime = cpu_to_fs32(sbi, inode->i_atime.tv_sec); raw_inode->i_atime = cpu_to_fs32(sbi, inode->i_atime.tv_sec);
......
...@@ -952,7 +952,6 @@ config UIDGID_CONVERTED ...@@ -952,7 +952,6 @@ config UIDGID_CONVERTED
depends on OCFS2_FS = n depends on OCFS2_FS = n
depends on REISERFS_FS = n depends on REISERFS_FS = n
depends on SQUASHFS = n depends on SQUASHFS = n
depends on SYSV_FS = n
depends on UBIFS_FS = n depends on UBIFS_FS = n
depends on UDF_FS = n depends on UDF_FS = n
depends on UFS_FS = n depends on UFS_FS = n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment