diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2013-01-31 19:59:23 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-13 09:00:57 -0500 |
commit | 03ab30f73dbf2f4f719d2c0c2acef81bf0445eb7 (patch) | |
tree | 1c4c33249ff55c2d97ef16a2b230c5a83c85937a /fs/ocfs2 | |
parent | 9522751cded17c231acd1cf92bc21b3da1b07f38 (diff) |
ocfs2: convert between kuids and kgids and DLM locks
Convert between uid and gids stored in the on the wire format of dlm
locks aka struct ocfs2_meta_lvb and kuids and kgids stored in
inode->i_uid and inode->i_gid.
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/dlmglue.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 4f7795fb5fc0..f99af1cb849c 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c | |||
@@ -2045,8 +2045,8 @@ static void __ocfs2_stuff_meta_lvb(struct inode *inode) | |||
2045 | lvb->lvb_version = OCFS2_LVB_VERSION; | 2045 | lvb->lvb_version = OCFS2_LVB_VERSION; |
2046 | lvb->lvb_isize = cpu_to_be64(i_size_read(inode)); | 2046 | lvb->lvb_isize = cpu_to_be64(i_size_read(inode)); |
2047 | lvb->lvb_iclusters = cpu_to_be32(oi->ip_clusters); | 2047 | lvb->lvb_iclusters = cpu_to_be32(oi->ip_clusters); |
2048 | lvb->lvb_iuid = cpu_to_be32(inode->i_uid); | 2048 | lvb->lvb_iuid = cpu_to_be32(i_uid_read(inode)); |
2049 | lvb->lvb_igid = cpu_to_be32(inode->i_gid); | 2049 | lvb->lvb_igid = cpu_to_be32(i_gid_read(inode)); |
2050 | lvb->lvb_imode = cpu_to_be16(inode->i_mode); | 2050 | lvb->lvb_imode = cpu_to_be16(inode->i_mode); |
2051 | lvb->lvb_inlink = cpu_to_be16(inode->i_nlink); | 2051 | lvb->lvb_inlink = cpu_to_be16(inode->i_nlink); |
2052 | lvb->lvb_iatime_packed = | 2052 | lvb->lvb_iatime_packed = |
@@ -2095,8 +2095,8 @@ static void ocfs2_refresh_inode_from_lvb(struct inode *inode) | |||
2095 | else | 2095 | else |
2096 | inode->i_blocks = ocfs2_inode_sector_count(inode); | 2096 | inode->i_blocks = ocfs2_inode_sector_count(inode); |
2097 | 2097 | ||
2098 | inode->i_uid = be32_to_cpu(lvb->lvb_iuid); | 2098 | i_uid_write(inode, be32_to_cpu(lvb->lvb_iuid)); |
2099 | inode->i_gid = be32_to_cpu(lvb->lvb_igid); | 2099 | i_gid_write(inode, be32_to_cpu(lvb->lvb_igid)); |
2100 | inode->i_mode = be16_to_cpu(lvb->lvb_imode); | 2100 | inode->i_mode = be16_to_cpu(lvb->lvb_imode); |
2101 | set_nlink(inode, be16_to_cpu(lvb->lvb_inlink)); | 2101 | set_nlink(inode, be16_to_cpu(lvb->lvb_inlink)); |
2102 | ocfs2_unpack_timespec(&inode->i_atime, | 2102 | ocfs2_unpack_timespec(&inode->i_atime, |