lkml.org 
[lkml]   [2010]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4/6] udf: Replace BKL
    Date
    Replace BKL with i_mutex in udf_symlink_filler function.

    This work was supported by a hardware donation from the CE Linux Forum.

    Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
    ---
    fs/udf/symlink.c | 8 ++++----
    1 files changed, 4 insertions(+), 4 deletions(-)

    diff --git a/fs/udf/symlink.c b/fs/udf/symlink.c
    index 1606478..cdf4492 100644
    --- a/fs/udf/symlink.c
    +++ b/fs/udf/symlink.c
    @@ -27,7 +27,7 @@
    #include <linux/mm.h>
    #include <linux/stat.h>
    #include <linux/pagemap.h>
    -#include <linux/smp_lock.h>
    +#include <linux/mutex.h>
    #include <linux/buffer_head.h>
    #include "udf_i.h"

    @@ -79,8 +79,8 @@ static int udf_symlink_filler(struct file *file, struct page *page)
    unsigned char *p = kmap(page);
    struct udf_inode_info *iinfo;

    - lock_kernel();
    iinfo = UDF_I(inode);
    + mutex_lock(&inode->i_mutex);
    if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) {
    symlink = iinfo->i_ext.i_data + iinfo->i_lenEAttr;
    } else {
    @@ -95,14 +95,14 @@ static int udf_symlink_filler(struct file *file, struct page *page)
    udf_pc_to_char(inode->i_sb, symlink, inode->i_size, p);
    brelse(bh);

    - unlock_kernel();
    + mutex_unlock(&inode->i_mutex);
    SetPageUptodate(page);
    kunmap(page);
    unlock_page(page);
    return 0;

    out:
    - unlock_kernel();
    + mutex_unlock(&inode->i_mutex);
    SetPageError(page);
    kunmap(page);
    unlock_page(page);
    --
    1.7.0.4


    \
     
     \ /
      Last update: 2010-10-23 13:41    [W:0.020 / U:60.920 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site