NFS: If nfs_mountpoint_expiry_timeout < 0, do not expire submounts
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: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
a99d8080aa
commit
22a1ae9a93
@ -157,6 +157,9 @@ struct vfsmount *nfs_d_automount(struct path *path)
|
|||||||
if (IS_ERR(mnt))
|
if (IS_ERR(mnt))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
if (nfs_mountpoint_expiry_timeout < 0)
|
||||||
|
goto out;
|
||||||
|
|
||||||
mntget(mnt); /* prevent immediate expiration */
|
mntget(mnt); /* prevent immediate expiration */
|
||||||
mnt_set_expiry(mnt, &nfs_automount_list);
|
mnt_set_expiry(mnt, &nfs_automount_list);
|
||||||
schedule_delayed_work(&nfs_automount_task, nfs_mountpoint_expiry_timeout);
|
schedule_delayed_work(&nfs_automount_task, nfs_mountpoint_expiry_timeout);
|
||||||
|
Loading…
Reference in New Issue
Block a user