]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: finish_automount() requires us to hold 2 refs to the mount record
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 2 Apr 2020 14:34:36 +0000 (10:34 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 2 Apr 2020 22:51:12 +0000 (18:51 -0400)
commite0446c30a1e647b376432d8c52a12ff2d5ed9a4d
treeebc21354f2cb42468d73ed950efdc249415f4a36
parent310a34a9db72060090f0eb6bfc06e71c67cd73f7
NFS: finish_automount() requires us to hold 2 refs to the mount record

We must not return from nfs_d_automount() without holding 2 references
to the mount record. Doing so, will trigger the BUG() in finish_automount().
Also ensure that we don't try to reschedule the automount timer with
a negative or zero timeout value.

Fixes: e6939bab8135 ("NFS: If nfs_mountpoint_expiry_timeout < 0, do not expire submounts")
Cc: stable@vger.kernel.org # v5.5+
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/namespace.c