From: Trond Myklebust Date: Wed, 21 Aug 2019 22:16:28 +0000 (-0400) Subject: NFS: If nfs_mountpoint_expiry_timeout < 0, do not expire submounts X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~3260^2~49 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=22a1ae9a93fb64600d0756e8f8051d65527f6786;p=linux.git 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 --- diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c index 9287eb666322..5e0e9d29f5c5 100644 --- a/fs/nfs/namespace.c +++ b/fs/nfs/namespace.c @@ -157,6 +157,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);