lkml.org 
[lkml]   [2013]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH review 22/85] ocfs2: convert between kuids and kgids and DLM locks
    From: "Eric W. Biederman" <ebiederm@xmission.com>

    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>
    ---
    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 4f7795f..f99af1c 100644
    --- a/fs/ocfs2/dlmglue.c
    +++ b/fs/ocfs2/dlmglue.c
    @@ -2045,8 +2045,8 @@ static void __ocfs2_stuff_meta_lvb(struct inode *inode)
    lvb->lvb_version = OCFS2_LVB_VERSION;
    lvb->lvb_isize = cpu_to_be64(i_size_read(inode));
    lvb->lvb_iclusters = cpu_to_be32(oi->ip_clusters);
    - lvb->lvb_iuid = cpu_to_be32(inode->i_uid);
    - lvb->lvb_igid = cpu_to_be32(inode->i_gid);
    + lvb->lvb_iuid = cpu_to_be32(i_uid_read(inode));
    + lvb->lvb_igid = cpu_to_be32(i_gid_read(inode));
    lvb->lvb_imode = cpu_to_be16(inode->i_mode);
    lvb->lvb_inlink = cpu_to_be16(inode->i_nlink);
    lvb->lvb_iatime_packed =
    @@ -2095,8 +2095,8 @@ static void ocfs2_refresh_inode_from_lvb(struct inode *inode)
    else
    inode->i_blocks = ocfs2_inode_sector_count(inode);

    - inode->i_uid = be32_to_cpu(lvb->lvb_iuid);
    - inode->i_gid = be32_to_cpu(lvb->lvb_igid);
    + i_uid_write(inode, be32_to_cpu(lvb->lvb_iuid));
    + i_gid_write(inode, be32_to_cpu(lvb->lvb_igid));
    inode->i_mode = be16_to_cpu(lvb->lvb_imode);
    set_nlink(inode, be16_to_cpu(lvb->lvb_inlink));
    ocfs2_unpack_timespec(&inode->i_atime,
    --
    1.7.5.4


    \
     
     \ /
      Last update: 2013-02-13 19:41    [W:5.352 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site