diff options
| -rw-r--r-- | fs/nfsd/nfs4state.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index f5ef9692a20a..63980afc2366 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1969,18 +1969,13 @@ out: return status; } -static int +static inline int nfs4_check_delegmode(struct nfs4_delegation *dp, int flags) { - int status = nfserr_openmode; - - if ((flags & WR_STATE) & (dp->dl_type == NFS4_OPEN_DELEGATE_READ)) - goto out; - if ((flags & RD_STATE) & (dp->dl_type == NFS4_OPEN_DELEGATE_WRITE)) - goto out; - status = nfs_ok; -out: - return status; + if ((flags & WR_STATE) && (dp->dl_type == NFS4_OPEN_DELEGATE_READ)) + return nfserr_openmode; + else + return nfs_ok; } static inline int |
