lkml.org 
[lkml]   [2012]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/6] vfs: don't revalidate just looked up dentry
    Date
    From: Miklos Szeredi <mszeredi@suse.cz>

    __lookup_hash() calls ->lookup() if the dentry needs lookup and on success
    revalidates the dentry (all under dir->i_mutex).

    While this is harmless it doesn't make a lot of sense.

    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
    ---
    fs/namei.c | 4 +---
    1 files changed, 1 insertions(+), 3 deletions(-)

    diff --git a/fs/namei.c b/fs/namei.c
    index 599e4a0..c93ea6d 100644
    --- a/fs/namei.c
    +++ b/fs/namei.c
    @@ -1746,9 +1746,7 @@ static struct dentry *__lookup_hash(struct qstr *name,
    * __lookup_hash is called with the parent dir's i_mutex already
    * held, so we are good to go here.
    */
    - dentry = d_inode_lookup(base, dentry, nd);
    - if (IS_ERR(dentry))
    - return dentry;
    + return d_inode_lookup(base, dentry, nd);
    }

    if (dentry && (dentry->d_flags & DCACHE_OP_REVALIDATE)) {
    --
    1.7.7


    \
     
     \ /
      Last update: 2012-03-26 12:57    [W:0.020 / U:124.456 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site