Merge tag 'drm-x86-pat-regression-fix' of git://people.freedesktop.org/~airlied/linux
[cascardo/linux.git] / fs / nfsd / nfs4layouts.c
index 2be9602..42aace4 100644 (file)
@@ -174,7 +174,8 @@ nfsd4_free_layout_stateid(struct nfs4_stid *stid)
        list_del_init(&ls->ls_perfile);
        spin_unlock(&fp->fi_lock);
 
-       vfs_setlease(ls->ls_file, F_UNLCK, NULL, (void **)&ls);
+       if (!nfsd4_layout_ops[ls->ls_layout_type]->disable_recalls)
+               vfs_setlease(ls->ls_file, F_UNLCK, NULL, (void **)&ls);
        fput(ls->ls_file);
 
        if (ls->ls_recalled)
@@ -189,6 +190,9 @@ nfsd4_layout_setlease(struct nfs4_layout_stateid *ls)
        struct file_lock *fl;
        int status;
 
+       if (nfsd4_layout_ops[ls->ls_layout_type]->disable_recalls)
+               return 0;
+
        fl = locks_alloc_lock();
        if (!fl)
                return -ENOMEM;