]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fixing infinite OPEN loop in 4.0 stateid recovery
authorOlga Kornievskaia <kolga@netapp.com>
Fri, 15 May 2015 15:45:31 +0000 (11:45 -0400)
committerSasha Levin <sasha.levin@oracle.com>
Sat, 4 Jul 2015 03:02:22 +0000 (23:02 -0400)
commit7c35396e519ae5cd027c4c73ee4a792ffda49c2a
treefa57d5b2e3f6df18979240380755eeb6d722ac30
parent05e308140f6b33f08033e079e7c168ebadde588b
fixing infinite OPEN loop in 4.0 stateid recovery

[ Upstream commit e8d975e73e5fa05f983fbf2723120edcf68e0b38 ]

Problem: When an operation like WRITE receives a BAD_STATEID, even though
recovery code clears the RECLAIM_NOGRACE recovery flag before recovering
the open state, because of clearing delegation state for the associated
inode, nfs_inode_find_state_and_recover() gets called and it makes the
same state with RECLAIM_NOGRACE flag again. As a results, when we restart
looking over the open states, we end up in the infinite loop instead of
breaking out in the next test of state flags.

Solution: unset the RECLAIM_NOGRACE set because of
calling of nfs_inode_find_state_and_recover() after returning from calling
recover_open() function.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
fs/nfs/nfs4state.c