Fix delayed_get_work() erroneously returning delayed_unemployed

delayed_get_work() seems to work only when there is one node in the AVL
tree (used as heap)! In the current implementation, a node can exist
without any tasks (after the tasks of a node are completed). It returns
delayed_unemployed when all tasks in the first node are emptied even if
the heap has other tasks. This commits makes sure that there is no node
without any tasks and returns delayed_unemployed only if the tree is
empty.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Jim Lieb <jlieb@panasas.com>
(cherry picked from commit 1335d1cfe92eb71a84d9d1eec360b8c46c622ec2)
Use LIST_EMPTY, LIST_FIRST macros insread of lh_first field

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Dominique Martinet <dominique.martinet@cea.fr>
(cherry picked from commit 80602e48a919ac78de45e090b415fc37106ddb7d)
Use delayed exec thread instead of fridge thread.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Added base support for CLAIM_DELEGATE_PREV

Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
Added nfs4_populate_revoked_delegs() to read revoked handles from
stable storage into memory.

Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Corrected code under deleg_reclaim_current

Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Added support for recording revoked file handles.

Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Added support to check if the deleg_reclaim_prev can be granted.

Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Simple fixes
Fix for function that removes delegations from list during state_unlock()
Filter out FSAL_O_RECLAIM from openflags.