Re: [PATCH 10/16] f2fs: add core inode operations

From: Eric W. Biederman
Date: Mon Oct 08 2012 - 12:35:11 EST


Changman Lee <cm224.lee@xxxxxxxxx> writes:
>> > +void update_inode(struct inode *inode, struct page *node_page)
>> > +{
>> > + Â Â struct f2fs_node *rn;
>> > + Â Â struct f2fs_inode *ri;
>> > +
>> > + Â Â wait_on_page_writeback(node_page);
>> > +
>> > + Â Â rn = page_address(node_page);
>> > + Â Â ri = &(rn->i);
>> > +
>> > + Â Â ri->i_mode = cpu_to_le16(inode->i_mode);
>> > + Â Â ri->i_uid = cpu_to_le32(inode->i_uid);
>> > + Â Â ri->i_gid = cpu_to_le32(inode->i_gid);
>> And make this:
>> Â Â Â Â i_uid_write(inode, le32_to_cpu(ri->i_uid));
>> Â Â Â Â i_gid_write(inode, le32_to_cpu(ri->i_gid));
>>
>
> You mean this. Right? :)
> ri->i_uid = cpu_to_le32(i_uid_read(inode));
> ri->i_gid = cpu_to_le32(i_gid_read(inode));

Yeah. ;)

I did have that one backwards.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/