diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2013-01-31 20:27:11 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-13 09:00:58 -0500 |
commit | 2c03417627c5edaeeae1e8c5da6e8fd6f8c720d3 (patch) | |
tree | 50f4255def1bf140f5198b8e2052f73f41bddae1 /fs/ocfs2 | |
parent | 03ab30f73dbf2f4f719d2c0c2acef81bf0445eb7 (diff) |
ocfs2: Convert uid and gids between in core and on disk inodes
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/inode.c | 12 | ||||
-rw-r--r-- | fs/ocfs2/namei.c | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index d89e08a81eda..f87f9bd1edff 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
@@ -269,8 +269,8 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, | |||
269 | inode->i_generation = le32_to_cpu(fe->i_generation); | 269 | inode->i_generation = le32_to_cpu(fe->i_generation); |
270 | inode->i_rdev = huge_decode_dev(le64_to_cpu(fe->id1.dev1.i_rdev)); | 270 | inode->i_rdev = huge_decode_dev(le64_to_cpu(fe->id1.dev1.i_rdev)); |
271 | inode->i_mode = le16_to_cpu(fe->i_mode); | 271 | inode->i_mode = le16_to_cpu(fe->i_mode); |
272 | inode->i_uid = le32_to_cpu(fe->i_uid); | 272 | i_uid_write(inode, le32_to_cpu(fe->i_uid)); |
273 | inode->i_gid = le32_to_cpu(fe->i_gid); | 273 | i_gid_write(inode, le32_to_cpu(fe->i_gid)); |
274 | 274 | ||
275 | /* Fast symlinks will have i_size but no allocated clusters. */ | 275 | /* Fast symlinks will have i_size but no allocated clusters. */ |
276 | if (S_ISLNK(inode->i_mode) && !fe->i_clusters) { | 276 | if (S_ISLNK(inode->i_mode) && !fe->i_clusters) { |
@@ -1259,8 +1259,8 @@ int ocfs2_mark_inode_dirty(handle_t *handle, | |||
1259 | 1259 | ||
1260 | fe->i_size = cpu_to_le64(i_size_read(inode)); | 1260 | fe->i_size = cpu_to_le64(i_size_read(inode)); |
1261 | ocfs2_set_links_count(fe, inode->i_nlink); | 1261 | ocfs2_set_links_count(fe, inode->i_nlink); |
1262 | fe->i_uid = cpu_to_le32(inode->i_uid); | 1262 | fe->i_uid = cpu_to_le32(i_uid_read(inode)); |
1263 | fe->i_gid = cpu_to_le32(inode->i_gid); | 1263 | fe->i_gid = cpu_to_le32(i_gid_read(inode)); |
1264 | fe->i_mode = cpu_to_le16(inode->i_mode); | 1264 | fe->i_mode = cpu_to_le16(inode->i_mode); |
1265 | fe->i_atime = cpu_to_le64(inode->i_atime.tv_sec); | 1265 | fe->i_atime = cpu_to_le64(inode->i_atime.tv_sec); |
1266 | fe->i_atime_nsec = cpu_to_le32(inode->i_atime.tv_nsec); | 1266 | fe->i_atime_nsec = cpu_to_le32(inode->i_atime.tv_nsec); |
@@ -1290,8 +1290,8 @@ void ocfs2_refresh_inode(struct inode *inode, | |||
1290 | ocfs2_set_inode_flags(inode); | 1290 | ocfs2_set_inode_flags(inode); |
1291 | i_size_write(inode, le64_to_cpu(fe->i_size)); | 1291 | i_size_write(inode, le64_to_cpu(fe->i_size)); |
1292 | set_nlink(inode, ocfs2_read_links_count(fe)); | 1292 | set_nlink(inode, ocfs2_read_links_count(fe)); |
1293 | inode->i_uid = le32_to_cpu(fe->i_uid); | 1293 | i_uid_write(inode, le32_to_cpu(fe->i_uid)); |
1294 | inode->i_gid = le32_to_cpu(fe->i_gid); | 1294 | i_gid_write(inode, le32_to_cpu(fe->i_gid)); |
1295 | inode->i_mode = le16_to_cpu(fe->i_mode); | 1295 | inode->i_mode = le16_to_cpu(fe->i_mode); |
1296 | if (S_ISLNK(inode->i_mode) && le32_to_cpu(fe->i_clusters) == 0) | 1296 | if (S_ISLNK(inode->i_mode) && le32_to_cpu(fe->i_clusters) == 0) |
1297 | inode->i_blocks = 0; | 1297 | inode->i_blocks = 0; |
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index f1fd0741162b..04ee1b57c243 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
@@ -512,8 +512,8 @@ static int __ocfs2_mknod_locked(struct inode *dir, | |||
512 | fe->i_suballoc_loc = cpu_to_le64(suballoc_loc); | 512 | fe->i_suballoc_loc = cpu_to_le64(suballoc_loc); |
513 | fe->i_suballoc_bit = cpu_to_le16(suballoc_bit); | 513 | fe->i_suballoc_bit = cpu_to_le16(suballoc_bit); |
514 | fe->i_suballoc_slot = cpu_to_le16(inode_ac->ac_alloc_slot); | 514 | fe->i_suballoc_slot = cpu_to_le16(inode_ac->ac_alloc_slot); |
515 | fe->i_uid = cpu_to_le32(inode->i_uid); | 515 | fe->i_uid = cpu_to_le32(i_uid_read(inode)); |
516 | fe->i_gid = cpu_to_le32(inode->i_gid); | 516 | fe->i_gid = cpu_to_le32(i_gid_read(inode)); |
517 | fe->i_mode = cpu_to_le16(inode->i_mode); | 517 | fe->i_mode = cpu_to_le16(inode->i_mode); |
518 | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) | 518 | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) |
519 | fe->id1.dev1.i_rdev = cpu_to_le64(huge_encode_dev(dev)); | 519 | fe->id1.dev1.i_rdev = cpu_to_le64(huge_encode_dev(dev)); |