gfs2: use check_submounts_and_drop()
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> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
ba81238076
commit
1191a2bdf0
1 changed files with 3 additions and 6 deletions
|
@ -93,12 +93,9 @@ invalid_gunlock:
|
||||||
if (!had_lock)
|
if (!had_lock)
|
||||||
gfs2_glock_dq_uninit(&d_gh);
|
gfs2_glock_dq_uninit(&d_gh);
|
||||||
invalid:
|
invalid:
|
||||||
if (inode && S_ISDIR(inode->i_mode)) {
|
if (check_submounts_and_drop(dentry) != 0)
|
||||||
if (have_submounts(dentry))
|
goto valid;
|
||||||
goto valid;
|
|
||||||
shrink_dcache_parent(dentry);
|
|
||||||
}
|
|
||||||
d_drop(dentry);
|
|
||||||
dput(parent);
|
dput(parent);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue