aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2005-11-04 15:38:11 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-11-04 15:38:11 -0500
commit888e694c167975709f17526dbbed2d98f84e8f85 (patch)
tree11dbbdf2591946f490d4cb28194a80fd3cec4094 /fs/nfs/nfs4proc.c
parent43b2a33aa868054bd477ab2c1cd20f1ba1af2c3e (diff)
NFSv4: Recover locks too when returning a delegation
Delegations allow us to cache posix and BSD locks, however when the delegation is recalled, we need to "flush the cache" and send the cached LOCK requests to the server. This patch sets up the mechanism for doing so. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 54ff465cf7cf..e6a9322a321f 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3124,6 +3124,24 @@ nfs4_proc_lock(struct file *filp, int cmd, struct file_lock *request)
3124 return status; 3124 return status;
3125} 3125}
3126 3126
3127int nfs4_lock_delegation_recall(struct nfs4_state *state, struct file_lock *fl)
3128{
3129 struct nfs_server *server = NFS_SERVER(state->inode);
3130 struct nfs4_exception exception = { };
3131 int err;
3132
3133 err = nfs4_set_lock_state(state, fl);
3134 if (err != 0)
3135 goto out;
3136 do {
3137 err = _nfs4_do_setlk(state, F_SETLK, fl, 0);
3138 if (err != -NFS4ERR_DELAY)
3139 break;
3140 err = nfs4_handle_exception(server, err, &exception);
3141 } while (exception.retry);
3142out:
3143 return err;
3144}
3127 3145
3128#define XATTR_NAME_NFSV4_ACL "system.nfs4_acl" 3146#define XATTR_NAME_NFSV4_ACL "system.nfs4_acl"
3129 3147