]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
NFSv4: Fix locking in pnfs_generic_recover_commit_reqs
authorTrond Myklebust <trondmy@gmail.com>
Tue, 14 Aug 2018 21:25:37 +0000 (17:25 -0400)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:45:56 +0000 (19:45 -0600)
commit062cb9802de06c85fadd040030bed30ed1a1db61
treed61348622b10f68293f6e5e4d6a0a6f12c8e395f
parent8644046663541fd92f45962aa8dff446b10c0a53
NFSv4: Fix locking in pnfs_generic_recover_commit_reqs

BugLink: https://bugs.launchpad.net/bugs/1835972
commit d0fbb1d8a194c0ec0180c1d073ad709e45503a43 upstream.

The use of the inode->i_lock was converted to a mutex, but we forgot
to remove the old inode unlock/lock() pair that allowed the layout
segment to be put inside the loop.

Reported-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Fixes: e824f99adaaf1 ("NFSv4: Use a mutex to protect the per-inode commit...")
Cc: stable@vger.kernel.org # v4.14+
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/nfs/pnfs_nfs.c