Revert "Revert "Added code to check for deadlock and return -EBUSY""

This reverts commit 02329051309681946a0a5e8bb1c47a6b5295623b.

Revert "Revert "Added code to check for deadlock and return -EBUSY""

This reverts commit 02329051309681946a0a5e8bb1c47a6b5295623b.

Added code to check for deadlock in TRYACQUIRE case