lkml.org 
[lkml]   [2013]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 06/11] gfs2: use check_submounts_and_drop()
    Date
    From: Miklos Szeredi <mszeredi@suse.cz>

    Do have_submounts(), shrink_dcache_parent() and d_drop() atomically.

    check_submounts_and_drop() can deal with negative dentries and
    non-directories as well.

    Non-directories can also be mounted on. And just like directories we don't
    want these to disappear with invalidation.

    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
    CC: Steven Whitehouse <swhiteho@redhat.com>
    ---
    fs/gfs2/dentry.c | 9 +++------
    1 file changed, 3 insertions(+), 6 deletions(-)

    diff --git a/fs/gfs2/dentry.c b/fs/gfs2/dentry.c
    index f2448ab..d3a5d4e 100644
    --- a/fs/gfs2/dentry.c
    +++ b/fs/gfs2/dentry.c
    @@ -93,12 +93,9 @@ invalid_gunlock:
    if (!had_lock)
    gfs2_glock_dq_uninit(&d_gh);
    invalid:
    - if (inode && S_ISDIR(inode->i_mode)) {
    - if (have_submounts(dentry))
    - goto valid;
    - shrink_dcache_parent(dentry);
    - }
    - d_drop(dentry);
    + if (check_submounts_and_drop(dentry) != 0)
    + goto valid;
    +
    dput(parent);
    return 0;

    --
    1.8.1.4


    \
     
     \ /
      Last update: 2013-09-05 12:21    [W:2.142 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site