NFS: nfs_find_open_context() may only select open files
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 12 May 2021 03:41:10 +0000 (23:41 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:17:52 +0000 (16:17 +0200)
commit34002b9fe988ee54b6556b7bdbde4e7232df9929
treeece06cc14f8c45f20f7aa8530dc1ade3a117f9c3
parent5962368a970b978906f25c291251e4d27e5952fd
NFS: nfs_find_open_context() may only select open files

[ Upstream commit e97bc66377bca097e1f3349ca18ca17f202ff659 ]

If a file has already been closed, then it should not be selected to
support further I/O.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
[Trond: Fix an invalid pointer deref reported by Colin Ian King]
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/inode.c
include/linux/nfs_fs.h