diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-07-26 16:57:20 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-07-26 17:02:07 -0400 |
commit | b1948a641daefe8d128749f3d419ed24d529a8ed (patch) | |
tree | bdb2e223e372ebc4d3436b6ecd3860476213de9c /fs/nfsd/nfs4state.c | |
parent | df66e75395c839c3a373bae897dbb1248f741b45 (diff) |
nfsd4: fix setlease error return
This actually makes a difference in the 4.1 case, since we use the
status to decide what reason to give the client for the delegation
refusal (see nfsd4_open_deleg_none_ext), and in theory a client might
choose suboptimal behavior if we give the wrong answer.
Reported-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 1cb621131b00..1852f5351b22 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -3028,7 +3028,7 @@ static int nfs4_setlease(struct nfs4_delegation *dp) | |||
3028 | if (status) { | 3028 | if (status) { |
3029 | list_del_init(&dp->dl_perclnt); | 3029 | list_del_init(&dp->dl_perclnt); |
3030 | locks_free_lock(fl); | 3030 | locks_free_lock(fl); |
3031 | return -ENOMEM; | 3031 | return status; |
3032 | } | 3032 | } |
3033 | fp->fi_lease = fl; | 3033 | fp->fi_lease = fl; |
3034 | fp->fi_deleg_file = get_file(fl->fl_file); | 3034 | fp->fi_deleg_file = get_file(fl->fl_file); |