lkml.org 
[lkml]   [2011]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] lmLogOpen() broken failure exit
    Callers of lmLogOpen() expect it to return -E... on failure exits, which
    is what it returns, except for the case of blkdev_get_by_dev() failure.
    It that case lmLogOpen() return the error with the wrong sign...

    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    ---
    diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
    index 278e3fb..583636f 100644
    --- a/fs/jfs/jfs_logmgr.c
    +++ b/fs/jfs/jfs_logmgr.c
    @@ -1123,7 +1123,7 @@ int lmLogOpen(struct super_block *sb)
    bdev = blkdev_get_by_dev(sbi->logdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL,
    log);
    if (IS_ERR(bdev)) {
    - rc = -PTR_ERR(bdev);
    + rc = PTR_ERR(bdev);
    goto free;
    }


    \
     
     \ /
      Last update: 2011-06-05 20:25    [W:0.017 / U:3.876 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site