xfs: merge the projid fields in struct xfs_icdinode
There is no point in splitting the fields like this in an purely in-memory structure. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:

committed by
Darrick J. Wong

parent
8d2d878db8
commit
de7a866fd4
@@ -213,13 +213,12 @@ xfs_inode_from_disk(
|
||||
to->di_version = from->di_version;
|
||||
if (to->di_version == 1) {
|
||||
set_nlink(inode, be16_to_cpu(from->di_onlink));
|
||||
to->di_projid_lo = 0;
|
||||
to->di_projid_hi = 0;
|
||||
to->di_projid = 0;
|
||||
to->di_version = 2;
|
||||
} else {
|
||||
set_nlink(inode, be32_to_cpu(from->di_nlink));
|
||||
to->di_projid_lo = be16_to_cpu(from->di_projid_lo);
|
||||
to->di_projid_hi = be16_to_cpu(from->di_projid_hi);
|
||||
to->di_projid = (prid_t)be16_to_cpu(from->di_projid_hi) << 16 |
|
||||
be16_to_cpu(from->di_projid_lo);
|
||||
}
|
||||
|
||||
to->di_format = from->di_format;
|
||||
@@ -279,8 +278,8 @@ xfs_inode_to_disk(
|
||||
to->di_format = from->di_format;
|
||||
to->di_uid = cpu_to_be32(from->di_uid);
|
||||
to->di_gid = cpu_to_be32(from->di_gid);
|
||||
to->di_projid_lo = cpu_to_be16(from->di_projid_lo);
|
||||
to->di_projid_hi = cpu_to_be16(from->di_projid_hi);
|
||||
to->di_projid_lo = cpu_to_be16(from->di_projid & 0xffff);
|
||||
to->di_projid_hi = cpu_to_be16(from->di_projid >> 16);
|
||||
|
||||
memset(to->di_pad, 0, sizeof(to->di_pad));
|
||||
to->di_atime.t_sec = cpu_to_be32(inode->i_atime.tv_sec);
|
||||
|
Reference in New Issue
Block a user