diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-02-07 19:28:39 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-09-21 06:13:33 -0400 |
commit | 0cfe53d3c3875e1dd565b30737cd5c6691c00188 (patch) | |
tree | 51079bb57feab17c32aa0477c6b67e85f023ae12 /fs/jffs2/file.c | |
parent | 0e1a43c71612cd0b6b50da03040c85fbf3d24211 (diff) |
userns: Convert jffs2 to use kuid and kgid where appropriate
- General routine uid/gid conversion work
- When storing posix acls treat ACL_USER and ACL_GROUP separately
so I can call from_kuid or from_kgid as appropriate.
- When reading posix acls treat ACL_USER and ACL_GROUP separately
so I can call make_kuid or make_kgid as appropriate.
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'fs/jffs2/file.c')
-rw-r--r-- | fs/jffs2/file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c index db3889ba8818..60ef3fb707ff 100644 --- a/fs/jffs2/file.c +++ b/fs/jffs2/file.c | |||
@@ -175,8 +175,8 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping, | |||
175 | ri.ino = cpu_to_je32(f->inocache->ino); | 175 | ri.ino = cpu_to_je32(f->inocache->ino); |
176 | ri.version = cpu_to_je32(++f->highest_version); | 176 | ri.version = cpu_to_je32(++f->highest_version); |
177 | ri.mode = cpu_to_jemode(inode->i_mode); | 177 | ri.mode = cpu_to_jemode(inode->i_mode); |
178 | ri.uid = cpu_to_je16(inode->i_uid); | 178 | ri.uid = cpu_to_je16(i_uid_read(inode)); |
179 | ri.gid = cpu_to_je16(inode->i_gid); | 179 | ri.gid = cpu_to_je16(i_gid_read(inode)); |
180 | ri.isize = cpu_to_je32(max((uint32_t)inode->i_size, pageofs)); | 180 | ri.isize = cpu_to_je32(max((uint32_t)inode->i_size, pageofs)); |
181 | ri.atime = ri.ctime = ri.mtime = cpu_to_je32(get_seconds()); | 181 | ri.atime = ri.ctime = ri.mtime = cpu_to_je32(get_seconds()); |
182 | ri.offset = cpu_to_je32(inode->i_size); | 182 | ri.offset = cpu_to_je32(inode->i_size); |
@@ -283,8 +283,8 @@ static int jffs2_write_end(struct file *filp, struct address_space *mapping, | |||
283 | /* Set the fields that the generic jffs2_write_inode_range() code can't find */ | 283 | /* Set the fields that the generic jffs2_write_inode_range() code can't find */ |
284 | ri->ino = cpu_to_je32(inode->i_ino); | 284 | ri->ino = cpu_to_je32(inode->i_ino); |
285 | ri->mode = cpu_to_jemode(inode->i_mode); | 285 | ri->mode = cpu_to_jemode(inode->i_mode); |
286 | ri->uid = cpu_to_je16(inode->i_uid); | 286 | ri->uid = cpu_to_je16(i_uid_read(inode)); |
287 | ri->gid = cpu_to_je16(inode->i_gid); | 287 | ri->gid = cpu_to_je16(i_gid_read(inode)); |
288 | ri->isize = cpu_to_je32((uint32_t)inode->i_size); | 288 | ri->isize = cpu_to_je32((uint32_t)inode->i_size); |
289 | ri->atime = ri->ctime = ri->mtime = cpu_to_je32(get_seconds()); | 289 | ri->atime = ri->ctime = ri->mtime = cpu_to_je32(get_seconds()); |
290 | 290 | ||