lkml.org 
[lkml]   [2010]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 07/19] exofs: use iput() for inode reference count decrements
    Date
    From: Dave Chinner <dchinner@redhat.com>

    Direct modification of the inode reference count is a no-no. Convert
    the exofs decrements to call iput() instead of acting directly on
    i_count.

    Signed-off-by: Dave Chinner <dchinner@redhat.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    ---
    fs/exofs/inode.c | 4 ++--
    1 files changed, 2 insertions(+), 2 deletions(-)

    diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
    index b631ff3..0fb4d4c 100644
    --- a/fs/exofs/inode.c
    +++ b/fs/exofs/inode.c
    @@ -1101,7 +1101,7 @@ static void create_done(struct exofs_io_state *ios, void *p)

    set_obj_created(oi);

    - atomic_dec(&inode->i_count);
    + iput(inode);
    wake_up(&oi->i_wq);
    }

    @@ -1161,7 +1161,7 @@ struct inode *exofs_new_inode(struct inode *dir, int mode)
    ios->cred = oi->i_cred;
    ret = exofs_sbi_create(ios);
    if (ret) {
    - atomic_dec(&inode->i_count);
    + iput(inode);
    exofs_put_io_state(ios);
    return ERR_PTR(ret);
    }
    --
    1.7.1


    \
     
     \ /
      Last update: 2010-10-16 10:17    [W:0.024 / U:0.164 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site