Re: [PATCH 1/7] ext4: Introduce le32_t and le16_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Andreas Dilger wrote:
On Sep 25, 2007  14:41 +0530, Aneesh Kumar K.V wrote:
The patches are on top of patch queue. I haven't touched
the uid and gid of ext4_inode. Do you think i should
change that too ?

You can add a Signed-off-by: Andreas Dilger <adilger@xxxxxxxxxxxxx>
to those patches.  As I suspected there were a number of bugs hiding
in there.  I would also change the uid and gid fields, even if we
don't suspect any problems now.


the primary reason for me not looking at uid gid and file_acl fields are

a) we can mount with option nouid32 and that will look at only the low 16 bits
b) same is true with the gid fields

c) Also i_file_acl. If the creater os is HURD we look at only the low 32 bits.


That means all the pace where we access these fields we have conditional access
That makes it less error prone. with the changes the code will some what as below
        if(!(test_opt (inode->i_sb, NO_UID32))) {
-               inode->i_uid |= le16_to_cpu(raw_inode->i_uid_high) << 16;
-               inode->i_gid |= le16_to_cpu(raw_inode->i_gid_high) << 16;
+               inode->i_uid = ext4_get_i_uid(raw_inode);
+               inode->i_gid = ext4_get_i_gid(raw_inode);
+       } else {
+               inode->i_uid = ext4_get_i_uid_low(raw_inode);
+               inode->i_gid = ext4_get_i_gid_low(raw_inode);
       }


-aneesh
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux