]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/nfsd/nfs4state.c
locks: let the caller free file_lock on ->setlease failure
[net-next-2.6.git] / fs / nfsd / nfs4state.c
index b7f818b0580c2667698b4cd2c0c14e8376cfa789..f1e5ec6b5105fe46a1537df2041f9d114d222f8d 100644 (file)
@@ -2652,6 +2652,7 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_sta
        if ((status = vfs_setlease(fl->fl_file, fl->fl_type, &fl))) {
                dprintk("NFSD: setlease failed [%d], no delegation\n", status);
                dp->dl_flock = NULL;
+               locks_free_lock(fl);
                unhash_delegation(dp);
                flag = NFS4_OPEN_DELEGATE_NONE;
                goto out;