[pnfs] [PATCH] get state lock
Marc Eshel
eshel at almaden.ibm.com
Mon May 28 21:25:37 EDT 2007
From: Marc Eshel <eshel at almaden.ibm.com>
---
fs/nfsd/nfs4state.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 3bfe338..08ca80e 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4045,6 +4045,7 @@ int nfs4_pnfs_get_layout(struct super_bl
dprintk("NFSD: nfs4_pnfs_get_layout\n");
+ nfs4_lock_state();
fp = find_file(ino);
if (!fp) {
fp = alloc_init_file(ino);
@@ -4113,6 +4114,7 @@ out:
if (fp)
put_nfs4_file(fp);
+ nfs4_unlock_state();
dprintk("pNFS %s: exit status %d \n", __FUNCTION__, status);
return status;
}
@@ -4128,6 +4130,7 @@ int nfs4_pnfs_return_layout(struct super
dprintk("NFSD: nfs4_pnfs_return_layout\n");
+ nfs4_lock_state();
fp = find_file(ino);
if (!fp)
goto out;
@@ -4148,6 +4151,7 @@ int nfs4_pnfs_return_layout(struct super
}
put_nfs4_file(fp);
out:
+ nfs4_unlock_state();
dprintk("pNFS %s: exit status %d \n", __FUNCTION__, status);
return status;
}
More information about the pNFS
mailing list