提交 89095d99 编写于 作者: T Trond Myklebust 提交者: Yang Yingliang

NFS: If nfs_mountpoint_expiry_timeout < 0, do not expire submounts

mainline inclusion
from mainline-v5.5-rc1
commit 22a1ae9a
category: bugfix
bugzilla: NA
CVE: NA

--------------------------------

If we set nfs_mountpoint_expiry_timeout to a negative value, then
allow that to imply that we do not expire NFSv4 submounts.
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: NZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Reviewed-by: NZhang Yi <yi.zhang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 3645855a
......@@ -160,6 +160,9 @@ struct vfsmount *nfs_d_automount(struct path *path)
if (IS_ERR(mnt))
goto out;
if (nfs_mountpoint_expiry_timeout < 0)
goto out;
mntget(mnt); /* prevent immediate expiration */
mnt_set_expiry(mnt, &nfs_automount_list);
schedule_delayed_work(&nfs_automount_task, nfs_mountpoint_expiry_timeout);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册