nfsd4: fix setlease error return
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 26 Jul 2013 20:57:20 +0000 (16:57 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 26 Jul 2013 21:02:07 +0000 (17:02 -0400)
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>
fs/nfsd/nfs4state.c

index 1cb621131b00a786bb1632cd6e5965dd1acb0a9a..1852f5351b221e175c757ce23dc94b620f132611 100644 (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);
This page took 0.03375 seconds and 5 git commands to generate.