lkml.org 
[lkml]   [2008]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] minix: fix add link - wrong position calculation
    This patch fixes add link method.
    Position in directory was calculated in wrong way.

    Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
    ---
    fs/minix/dir.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/fs/minix/dir.c b/fs/minix/dir.c
    index f704338..4b603b7 100644
    --- a/fs/minix/dir.c
    +++ b/fs/minix/dir.c
    @@ -280,7 +280,7 @@ int minix_add_link(struct dentry *dentry, struct inode *inode)
    return -EINVAL;

    got_it:
    - pos = (page->index >> PAGE_CACHE_SHIFT) + p - (char*)page_address(page);
    + pos = page_offset(page) + p - (char*)page_address(page);
    err = __minix_write_begin(NULL, page->mapping, pos, sbi->s_dirsize,
    AOP_FLAG_UNINTERRUPTIBLE, &page, NULL);
    if (err)
    --
    1.6.0.6
    --
    /Evgeniy



    \
     
     \ /
      Last update: 2008-12-29 00:31    [W:0.020 / U:64.256 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site