aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorNeilBrown <neilb@cse.unsw.edu.au>2005-06-24 01:02:56 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-24 03:06:28 -0400
commit0dd3c19212961453817f219cd6200981c38564bc (patch)
treedca7cbaf25a0f114a1b8475e935f33272762d273 /fs/nfsd
parentc44c5eeb2c022ddac98a8543c08dc8ff820561dc (diff)
[PATCH] nfsd4: support CLAIM_DELEGATE_CUR
Add OPEN claim type NFS4_OPEN_CLAIM_DELEGATE_CUR to nfsd4_open(). A delegation stateid and a name are provided. OPEN with O_CREAT is not legal with this claim type; otherwise, use the NFS4_OPEN_CLAIM_NULL code path to lookup the filename to be opened. Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4proc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index e8158741e8b5..eb8c1337d9ba 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -198,6 +198,11 @@ nfsd4_open(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open
198 if (status) 198 if (status)
199 goto out; 199 goto out;
200 switch (open->op_claim_type) { 200 switch (open->op_claim_type) {
201 case NFS4_OPEN_CLAIM_DELEGATE_CUR:
202 status = nfserr_inval;
203 if (open->op_create)
204 goto out;
205 /* fall through */
201 case NFS4_OPEN_CLAIM_NULL: 206 case NFS4_OPEN_CLAIM_NULL:
202 /* 207 /*
203 * (1) set CURRENT_FH to the file being opened, 208 * (1) set CURRENT_FH to the file being opened,
@@ -220,7 +225,6 @@ nfsd4_open(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open
220 if (status) 225 if (status)
221 goto out; 226 goto out;
222 break; 227 break;
223 case NFS4_OPEN_CLAIM_DELEGATE_CUR:
224 case NFS4_OPEN_CLAIM_DELEGATE_PREV: 228 case NFS4_OPEN_CLAIM_DELEGATE_PREV:
225 printk("NFSD: unsupported OPEN claim type %d\n", 229 printk("NFSD: unsupported OPEN claim type %d\n",
226 open->op_claim_type); 230 open->op_claim_type);