Commit cd522168 authored by Linus Torvalds's avatar Linus Torvalds

Fix vfsmnt leak: make autofs4 mount point expiry release

the entry that we got through the lookup_mnt().

Noted by Dick Streefland.
parent 73229285
......@@ -70,8 +70,11 @@ static int check_vfsmnt(struct vfsmount *mnt, struct dentry *dentry)
int ret = dentry->d_mounted;
struct vfsmount *vfs = lookup_mnt(mnt, dentry);
if (vfs && is_vfsmnt_tree_busy(vfs))
ret--;
if (vfs) {
mntput(vfs);
if (is_vfsmnt_tree_busy(vfs))
ret--;
}
DPRINTK(("check_vfsmnt: ret=%d\n", ret));
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment