diff --git a/fs/gfs2/dentry.c b/fs/gfs2/dentry.c index f2448ab2aac54d99306140a192afa1c1d9e3dc46..d3a5d4e29ba5f37b10f4f0fd0043c7e9847b9923 100644 --- a/fs/gfs2/dentry.c +++ b/fs/gfs2/dentry.c @@ -93,12 +93,9 @@ static int gfs2_drevalidate(struct dentry *dentry, unsigned int flags) 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;