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>
This commit is contained in:
J. Bruce Fields 2013-07-26 16:57:20 -04:00
parent df66e75395
commit b1948a641d
1 changed files with 1 additions and 1 deletions

View File

@ -3028,7 +3028,7 @@ static int nfs4_setlease(struct nfs4_delegation *dp)
if (status) {
list_del_init(&dp->dl_perclnt);
locks_free_lock(fl);
return -ENOMEM;
return status;
}
fp->fi_lease = fl;
fp->fi_deleg_file = get_file(fl->fl_file);