ocfs2: without quota support, avoid calling quota recovery
[linux-2.6-block.git] / fs / userfaultfd.c
index bfa0ec69f924bcbdebca1456d007b89d4e172a1c..356d2b8568c1424d1d1935c451e65c7db13aab62 100644 (file)
@@ -1026,7 +1026,7 @@ static ssize_t userfaultfd_ctx_read(struct userfaultfd_ctx *ctx, int no_wait,
        struct userfaultfd_ctx *fork_nctx = NULL;
 
        /* always take the fd_wqh lock before the fault_pending_wqh lock */
-       spin_lock(&ctx->fd_wqh.lock);
+       spin_lock_irq(&ctx->fd_wqh.lock);
        __add_wait_queue(&ctx->fd_wqh, &wait);
        for (;;) {
                set_current_state(TASK_INTERRUPTIBLE);
@@ -1112,13 +1112,13 @@ static ssize_t userfaultfd_ctx_read(struct userfaultfd_ctx *ctx, int no_wait,
                        ret = -EAGAIN;
                        break;
                }
-               spin_unlock(&ctx->fd_wqh.lock);
+               spin_unlock_irq(&ctx->fd_wqh.lock);
                schedule();
-               spin_lock(&ctx->fd_wqh.lock);
+               spin_lock_irq(&ctx->fd_wqh.lock);
        }
        __remove_wait_queue(&ctx->fd_wqh, &wait);
        __set_current_state(TASK_RUNNING);
-       spin_unlock(&ctx->fd_wqh.lock);
+       spin_unlock_irq(&ctx->fd_wqh.lock);
 
        if (!ret && msg->event == UFFD_EVENT_FORK) {
                ret = resolve_userfault_fork(ctx, fork_nctx, msg);