Commit c6d7637d authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] nfsd4: simplify open_delegation

The DONT_DELEGATE flag is superfluous.
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6eef1c50
...@@ -1522,8 +1522,6 @@ nfs4_deleg_conflict(u32 share, u32 dtype) ...@@ -1522,8 +1522,6 @@ nfs4_deleg_conflict(u32 share, u32 dtype)
dtype == NFS4_OPEN_DELEGATE_WRITE)); dtype == NFS4_OPEN_DELEGATE_WRITE));
} }
#define DONT_DELEGATE 8
/* /*
* nfs4_check_deleg_recall() * nfs4_check_deleg_recall()
* *
...@@ -1544,7 +1542,7 @@ nfs4_check_deleg_recall(struct nfs4_file *fp, struct nfsd4_open *op, int *flag) ...@@ -1544,7 +1542,7 @@ nfs4_check_deleg_recall(struct nfs4_file *fp, struct nfsd4_open *op, int *flag)
if(nfs4_deleg_conflict(op->op_share_access, dp->dl_type)) if(nfs4_deleg_conflict(op->op_share_access, dp->dl_type))
status = nfserr_jukebox; status = nfserr_jukebox;
else else
*flag = DONT_DELEGATE; *flag = NFS4_OPEN_DELEGATE_NONE;
} }
} }
return status; return status;
...@@ -1663,10 +1661,8 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_sta ...@@ -1663,10 +1661,8 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_sta
struct file_lock fl, *flp = &fl; struct file_lock fl, *flp = &fl;
int status; int status;
if (*flag == DONT_DELEGATE) { if (*flag == NFS4_OPEN_DELEGATE_NONE)
*flag = NFS4_OPEN_DELEGATE_NONE;
return; return;
}
/* set flag */ /* set flag */
*flag = NFS4_OPEN_DELEGATE_NONE; *flag = NFS4_OPEN_DELEGATE_NONE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment