[pnfs] [PATCH] nfs4_close_delegation: release state lock around nfsd_close
Benny Halevy
bhalevy at panasas.com
Tue Sep 11 02:12:02 EDT 2007
similar to the release_stateid in the regular close path
the state_lock needs to be released around the call to nfsd_close
to allow the exported file system to recall layouts and the client
to return layouts while the file system waits synchronously
for these to be returned before returning from nfsd_close.
Signed-off-by: Benny Halevy <bhalevy at panasas.com>
---
fs/nfsd/nfs4state.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 0a1965b..07caf75 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -289,7 +289,10 @@ nfs4_close_delegation(struct nfs4_delegation *dp)
* but we want to remove the lease in any case. */
if (dp->dl_flock)
setlease(filp, F_UNLCK, &dp->dl_flock);
+ BUG_ON_UNLOCKED_STATE();
+ nfs4_unlock_state(); /* allow nested layout recall/return */
nfsd_close(filp);
+ nfs4_lock_state();
}
/* Called under the state lock. */
--
1.5.3.1
More information about the pNFS
mailing list