lkml.org 
[lkml]   [2010]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH][resend] namei.c : update mnt when it needed
    Date
    update the mnt of the path when it is not equal to the new one.

    Signed-off-by: Huang Shijie <shijie8@gmail.com>
    ---
    fs/namei.c | 5 +++--
    1 files changed, 3 insertions(+), 2 deletions(-)

    diff --git a/fs/namei.c b/fs/namei.c
    index a7dce91..9c3a040 100644
    --- a/fs/namei.c
    +++ b/fs/namei.c
    @@ -523,9 +523,10 @@ static void path_put_conditional(struct path *path, struct nameidata *nd)
    static inline void path_to_nameidata(struct path *path, struct nameidata *nd)
    {
    dput(nd->path.dentry);
    - if (nd->path.mnt != path->mnt)
    + if (nd->path.mnt != path->mnt) {
    mntput(nd->path.mnt);
    - nd->path.mnt = path->mnt;
    + nd->path.mnt = path->mnt;
    + }
    nd->path.dentry = path->dentry;
    }

    --
    1.6.6


    \
     
     \ /
      Last update: 2010-04-14 04:19    [W:0.021 / U:0.008 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site