/fs/ocfs2/dlm/ |
D | dlmast.c | 54 struct dlm_lock *lock); 55 static int dlm_should_cancel_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock); 66 static int dlm_should_cancel_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock) in dlm_should_cancel_bast() argument 69 assert_spin_locked(&lock->spinlock); in dlm_should_cancel_bast() 71 if (lock->ml.highest_blocked == LKM_IVMODE) in dlm_should_cancel_bast() 73 BUG_ON(lock->ml.highest_blocked == LKM_NLMODE); in dlm_should_cancel_bast() 75 if (lock->bast_pending && in dlm_should_cancel_bast() 76 list_empty(&lock->bast_list)) in dlm_should_cancel_bast() 80 if (lock->ml.type == LKM_EXMODE) in dlm_should_cancel_bast() 83 else if (lock->ml.type == LKM_NLMODE) in dlm_should_cancel_bast() [all …]
|
D | dlmlock.c | 63 struct dlm_lock *lock, int flags); 67 static void dlm_lock_detach_lockres(struct dlm_lock *lock); 93 struct dlm_lock *lock) in dlm_can_grant_new_lock() argument 101 if (!dlm_lock_compatible(tmplock->ml.type, lock->ml.type)) in dlm_can_grant_new_lock() 108 if (!dlm_lock_compatible(tmplock->ml.type, lock->ml.type)) in dlm_can_grant_new_lock() 124 struct dlm_lock *lock, int flags) in dlmlock_master() argument 129 mlog_entry("type=%d\n", lock->ml.type); in dlmlock_master() 136 lock->ml.node != dlm->node_num) { in dlmlock_master() 145 if (dlm_can_grant_new_lock(res, lock)) { in dlmlock_master() 148 lock->lksb->status = DLM_NORMAL; in dlmlock_master() [all …]
|
D | dlmconvert.c | 62 struct dlm_lock *lock, int flags, 67 struct dlm_lock *lock, int flags, int type); 80 struct dlm_lock *lock, int flags, int type) in dlmconvert_master() argument 91 status = __dlmconvert_master(dlm, res, lock, flags, type, in dlmconvert_master() 102 dlm_queue_ast(dlm, lock); in dlmconvert_master() 123 struct dlm_lock *lock, int flags, in __dlmconvert_master() argument 134 lock->ml.type, lock->ml.convert_type, type); in __dlmconvert_master() 136 spin_lock(&lock->spinlock); in __dlmconvert_master() 139 if (lock->ml.convert_type != LKM_IVMODE) { in __dlmconvert_master() 147 if (!dlm_lock_on_list(&res->granted, lock)) { in __dlmconvert_master() [all …]
|
D | dlmunlock.c | 62 struct dlm_lock *lock, 67 struct dlm_lock *lock, 73 struct dlm_lock *lock, 102 struct dlm_lock *lock, in dlmunlock_common() argument 123 in_use = !list_empty(&lock->ast_list); in dlmunlock_common() 143 spin_lock(&lock->spinlock); in dlmunlock_common() 158 status = dlm_get_cancel_actions(dlm, res, lock, lksb, &actions); in dlmunlock_common() 160 status = dlm_get_unlock_actions(dlm, res, lock, lksb, &actions); in dlmunlock_common() 179 lock->cancel_pending = 1; in dlmunlock_common() 181 lock->unlock_pending = 1; in dlmunlock_common() [all …]
|
D | dlmthread.c | 59 #define dlm_lock_is_remote(dlm, lock) ((lock)->ml.node != (dlm)->node_num) argument 280 struct dlm_lock *lock, *target; in dlm_shuffle_lists() local 313 lock = list_entry(iter, struct dlm_lock, list); in dlm_shuffle_lists() 314 if (lock==target) in dlm_shuffle_lists() 316 if (!dlm_lock_compatible(lock->ml.type, in dlm_shuffle_lists() 320 if (lock->ml.highest_blocked == LKM_IVMODE) { in dlm_shuffle_lists() 322 dlm_queue_bast(dlm, lock); in dlm_shuffle_lists() 325 if (lock->ml.highest_blocked < target->ml.convert_type) in dlm_shuffle_lists() 326 lock->ml.highest_blocked = in dlm_shuffle_lists() 332 lock = list_entry(iter, struct dlm_lock, list); in dlm_shuffle_lists() [all …]
|
D | dlmdebug.c | 74 static void __dlm_print_lock(struct dlm_lock *lock) in __dlm_print_lock() argument 76 spin_lock(&lock->spinlock); in __dlm_print_lock() 81 lock->ml.type, lock->ml.convert_type, lock->ml.node, in __dlm_print_lock() 82 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), in __dlm_print_lock() 83 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie)), in __dlm_print_lock() 84 atomic_read(&lock->lock_refs.refcount), in __dlm_print_lock() 85 (list_empty(&lock->ast_list) ? 'y' : 'n'), in __dlm_print_lock() 86 (lock->ast_pending ? 'y' : 'n'), in __dlm_print_lock() 87 (list_empty(&lock->bast_list) ? 'y' : 'n'), in __dlm_print_lock() 88 (lock->bast_pending ? 'y' : 'n'), in __dlm_print_lock() [all …]
|
D | dlmrecovery.c | 1041 struct dlm_lock *lock; in dlm_move_reco_locks_to_list() local 1050 list_for_each_entry(lock, &res->granted, list) { in dlm_move_reco_locks_to_list() 1051 if (lock->ml.node == dead_node) { in dlm_move_reco_locks_to_list() 1056 list_del_init(&lock->list); in dlm_move_reco_locks_to_list() 1057 dlm_lock_put(lock); in dlm_move_reco_locks_to_list() 1171 static int dlm_add_lock_to_array(struct dlm_lock *lock, in dlm_add_lock_to_array() argument 1178 ml->cookie = lock->ml.cookie; in dlm_add_lock_to_array() 1179 ml->type = lock->ml.type; in dlm_add_lock_to_array() 1180 ml->convert_type = lock->ml.convert_type; in dlm_add_lock_to_array() 1181 ml->highest_blocked = lock->ml.highest_blocked; in dlm_add_lock_to_array() [all …]
|
/fs/lockd/ |
D | svclock.c | 46 static int nlmsvc_setgrantargs(struct nlm_rqst *call, struct nlm_lock *lock); 105 nlmsvc_lookup_block(struct nlm_file *file, struct nlm_lock *lock) in nlmsvc_lookup_block() argument 111 file, lock->fl.fl_pid, in nlmsvc_lookup_block() 112 (long long)lock->fl.fl_start, in nlmsvc_lookup_block() 113 (long long)lock->fl.fl_end, lock->fl.fl_type); in nlmsvc_lookup_block() 115 fl = &block->b_call->a_args.lock.fl; in nlmsvc_lookup_block() 121 if (block->b_file == file && nlm_compare_locks(fl, &lock->fl)) { in nlmsvc_lookup_block() 177 struct nlm_file *file, struct nlm_lock *lock, in nlmsvc_create_block() argument 196 if (!nlmsvc_setgrantargs(call, lock)) in nlmsvc_create_block() 200 call->a_args.lock.fl.fl_flags |= FL_SLEEP; in nlmsvc_create_block() [all …]
|
D | xdr4.c | 122 nlm4_decode_lock(__be32 *p, struct nlm_lock *lock) in nlm4_decode_lock() argument 124 struct file_lock *fl = &lock->fl; in nlm4_decode_lock() 128 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlm4_decode_lock() 129 &lock->len, NLM_MAXSTRLEN)) in nlm4_decode_lock() 130 || !(p = nlm4_decode_fh(p, &lock->fh)) in nlm4_decode_lock() 131 || !(p = nlm4_decode_oh(p, &lock->oh))) in nlm4_decode_lock() 133 lock->svid = ntohl(*p++); in nlm4_decode_lock() 137 fl->fl_pid = (pid_t)lock->svid; in nlm4_decode_lock() 157 nlm4_encode_lock(__be32 *p, struct nlm_lock *lock) in nlm4_encode_lock() argument 159 struct file_lock *fl = &lock->fl; in nlm4_encode_lock() [all …]
|
D | xdr.c | 121 nlm_decode_lock(__be32 *p, struct nlm_lock *lock) in nlm_decode_lock() argument 123 struct file_lock *fl = &lock->fl; in nlm_decode_lock() 126 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlm_decode_lock() 127 &lock->len, in nlm_decode_lock() 129 || !(p = nlm_decode_fh(p, &lock->fh)) in nlm_decode_lock() 130 || !(p = nlm_decode_oh(p, &lock->oh))) in nlm_decode_lock() 132 lock->svid = ntohl(*p++); in nlm_decode_lock() 136 fl->fl_pid = (pid_t)lock->svid; in nlm_decode_lock() 156 nlm_encode_lock(__be32 *p, struct nlm_lock *lock) in nlm_encode_lock() argument 158 struct file_lock *fl = &lock->fl; in nlm_encode_lock() [all …]
|
D | svc4proc.c | 31 struct nlm_lock *lock = &argp->lock; in nlm4svc_retrieve_args() local 39 if (!(host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len)) in nlm4svc_retrieve_args() 46 if ((error = nlm_lookup_file(rqstp, &file, &lock->fh)) != 0) in nlm4svc_retrieve_args() 51 lock->fl.fl_file = file->f_file; in nlm4svc_retrieve_args() 52 lock->fl.fl_owner = (fl_owner_t) host; in nlm4svc_retrieve_args() 53 lock->fl.fl_lmops = &nlmsvc_lock_operations; in nlm4svc_retrieve_args() 94 resp->status = nlmsvc_testlock(rqstp, file, host, &argp->lock, &resp->lock, &resp->cookie); in nlm4svc_proc_test() 134 resp->status = nlmsvc_lock(rqstp, file, host, &argp->lock, in nlm4svc_proc_lock() 169 resp->status = nlmsvc_cancel_blocked(file, &argp->lock); in nlm4svc_proc_cancel() 202 resp->status = nlmsvc_unlock(file, &argp->lock); in nlm4svc_proc_unlock() [all …]
|
D | svcproc.c | 60 struct nlm_lock *lock = &argp->lock; in nlmsvc_retrieve_args() local 68 if (!(host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len)) in nlmsvc_retrieve_args() 75 if ((error = nlm_lookup_file(rqstp, &file, &lock->fh)) != 0) in nlmsvc_retrieve_args() 80 lock->fl.fl_file = file->f_file; in nlmsvc_retrieve_args() 81 lock->fl.fl_owner = (fl_owner_t) host; in nlmsvc_retrieve_args() 82 lock->fl.fl_lmops = &nlmsvc_lock_operations; in nlmsvc_retrieve_args() 123 …resp->status = cast_status(nlmsvc_testlock(rqstp, file, host, &argp->lock, &resp->lock, &resp->coo… in nlmsvc_proc_test() 164 resp->status = cast_status(nlmsvc_lock(rqstp, file, host, &argp->lock, in nlmsvc_proc_lock() 199 resp->status = cast_status(nlmsvc_cancel_blocked(file, &argp->lock)); in nlmsvc_proc_cancel() 232 resp->status = cast_status(nlmsvc_unlock(file, &argp->lock)); in nlmsvc_proc_unlock() [all …]
|
D | clntproc.c | 126 struct nlm_lock *lock = &argp->lock; in nlmclnt_setlockargs() local 130 memcpy(&lock->fh, NFS_FH(fl->fl_file->f_path.dentry->d_inode), sizeof(struct nfs_fh)); in nlmclnt_setlockargs() 131 lock->caller = utsname()->nodename; in nlmclnt_setlockargs() 132 lock->oh.data = req->a_owner; in nlmclnt_setlockargs() 133 lock->oh.len = snprintf(req->a_owner, sizeof(req->a_owner), "%u@%s", in nlmclnt_setlockargs() 136 lock->svid = fl->fl_u.nfs_fl.owner->pid; in nlmclnt_setlockargs() 137 lock->fl.fl_start = fl->fl_start; in nlmclnt_setlockargs() 138 lock->fl.fl_end = fl->fl_end; in nlmclnt_setlockargs() 139 lock->fl.fl_type = fl->fl_type; in nlmclnt_setlockargs() 144 BUG_ON(req->a_args.lock.fl.fl_ops != NULL); in nlmclnt_release_lockargs() [all …]
|
/fs/btrfs/ |
D | async-thread.c | 53 spinlock_t lock; member 71 spin_lock_irqsave(&worker->workers->lock, flags); in check_idle_worker() 74 spin_unlock_irqrestore(&worker->workers->lock, flags); in check_idle_worker() 87 spin_lock_irqsave(&worker->workers->lock, flags); in check_busy_worker() 91 spin_unlock_irqrestore(&worker->workers->lock, flags); in check_busy_worker() 105 spin_lock_irqsave(&workers->lock, flags); in run_ordered_completions() 122 spin_unlock_irqrestore(&workers->lock, flags); in run_ordered_completions() 127 spin_lock_irqsave(&workers->lock, flags); in run_ordered_completions() 132 spin_unlock_irqrestore(&workers->lock, flags); in run_ordered_completions() 145 spin_lock_irq(&worker->lock); in worker_loop() [all …]
|
D | locking.c | 30 spin_lock(&eb->lock); in spin_nested() 42 spin_unlock(&eb->lock); in btrfs_set_lock_blocking() 101 spin_unlock(&eb->lock); in btrfs_try_spin_lock() 111 spin_unlock(&eb->lock); in btrfs_try_spin_lock() 162 spin_unlock(&eb->lock); in btrfs_tree_lock() 192 if (spin_trylock(&eb->lock)) { in btrfs_try_tree_lock() 198 spin_unlock(&eb->lock); in btrfs_try_tree_lock() 216 spin_unlock(&eb->lock); in btrfs_tree_unlock() 226 assert_spin_locked(&eb->lock); in btrfs_assert_tree_locked()
|
D | ref-cache.c | 130 spin_lock(&tree->lock); in btrfs_remove_leaf_refs() 137 cond_resched_lock(&tree->lock); in btrfs_remove_leaf_refs() 144 spin_unlock(&tree->lock); in btrfs_remove_leaf_refs() 147 spin_lock(&tree->lock); in btrfs_remove_leaf_refs() 149 spin_unlock(&tree->lock); in btrfs_remove_leaf_refs() 165 spin_lock(&tree->lock); in btrfs_lookup_leaf_ref() 171 spin_unlock(&tree->lock); in btrfs_lookup_leaf_ref() 196 spin_lock(&tree->lock); in btrfs_add_leaf_ref() 206 spin_unlock(&tree->lock); in btrfs_add_leaf_ref() 222 spin_lock(&tree->lock); in btrfs_remove_leaf_ref() [all …]
|
/fs/afs/ |
D | vnode.c | 221 spin_lock(&vnode->lock); in afs_vnode_finalise_status_update() 226 spin_unlock(&vnode->lock); in afs_vnode_finalise_status_update() 240 spin_lock(&vnode->lock); in afs_vnode_status_update_failed() 252 spin_unlock(&vnode->lock); in afs_vnode_status_update_failed() 293 spin_lock(&vnode->lock); in afs_vnode_fetch_status() 297 spin_unlock(&vnode->lock); in afs_vnode_fetch_status() 328 spin_unlock(&vnode->lock); in afs_vnode_fetch_status() 333 spin_lock(&vnode->lock); in afs_vnode_fetch_status() 337 spin_unlock(&vnode->lock); in afs_vnode_fetch_status() 348 spin_unlock(&vnode->lock); in afs_vnode_fetch_status() [all …]
|
D | flock.c | 118 spin_lock(&vnode->lock); in afs_lock_work() 122 spin_unlock(&vnode->lock); in afs_lock_work() 132 spin_lock(&vnode->lock); in afs_lock_work() 148 spin_unlock(&vnode->lock); in afs_lock_work() 184 spin_unlock(&vnode->lock); in afs_lock_work() 200 spin_lock(&vnode->lock); in afs_lock_work() 211 spin_unlock(&vnode->lock); in afs_lock_work() 216 spin_unlock(&vnode->lock); in afs_lock_work() 229 spin_unlock(&vnode->lock); in afs_lock_work() 290 spin_lock(&vnode->lock); in afs_do_setlk() [all …]
|
/fs/xfs/ |
D | xfs_mru_cache.c | 234 xfs_mru_cache_t *mru) __releases(mru->lock) __acquires(mru->lock) in _xfs_mru_cache_clear_reap_list() 252 spin_unlock(&mru->lock); in _xfs_mru_cache_clear_reap_list() 266 spin_lock(&mru->lock); in _xfs_mru_cache_clear_reap_list() 287 spin_lock(&mru->lock); in _xfs_mru_cache_reap() 301 spin_unlock(&mru->lock); in _xfs_mru_cache_reap() 378 spin_lock_init(&mru->lock); in xfs_mru_cache_create() 408 spin_lock(&mru->lock); in xfs_mru_cache_flush() 410 spin_unlock(&mru->lock); in xfs_mru_cache_flush() 412 spin_lock(&mru->lock); in xfs_mru_cache_flush() 418 spin_unlock(&mru->lock); in xfs_mru_cache_flush() [all …]
|
/fs/fuse/ |
D | dev.c | 141 spin_lock(&fc->lock); in get_reserved_req() 148 spin_unlock(&fc->lock); in get_reserved_req() 162 spin_lock(&fc->lock); in put_reserved_req() 167 spin_unlock(&fc->lock); in put_reserved_req() 272 __releases(&fc->lock) in request_end() 293 spin_unlock(&fc->lock); in request_end() 302 __releases(&fc->lock) in wait_answer_interruptible() 303 __acquires(&fc->lock) in wait_answer_interruptible() 308 spin_unlock(&fc->lock); in wait_answer_interruptible() 310 spin_lock(&fc->lock); in wait_answer_interruptible() [all …]
|
/fs/ |
D | eventfd.c | 48 spin_lock_irqsave(&ctx->wqh.lock, flags); in eventfd_signal() 54 spin_unlock_irqrestore(&ctx->wqh.lock, flags); in eventfd_signal() 73 spin_lock_irqsave(&ctx->wqh.lock, flags); in eventfd_poll() 80 spin_unlock_irqrestore(&ctx->wqh.lock, flags); in eventfd_poll() 95 spin_lock_irq(&ctx->wqh.lock); in eventfd_read() 113 spin_unlock_irq(&ctx->wqh.lock); in eventfd_read() 115 spin_lock_irq(&ctx->wqh.lock); in eventfd_read() 125 spin_unlock_irq(&ctx->wqh.lock); in eventfd_read() 146 spin_lock_irq(&ctx->wqh.lock); in eventfd_write() 162 spin_unlock_irq(&ctx->wqh.lock); in eventfd_write() [all …]
|
D | timerfd.c | 44 spin_lock_irqsave(&ctx->wqh.lock, flags); in timerfd_tmrproc() 48 spin_unlock_irqrestore(&ctx->wqh.lock, flags); in timerfd_tmrproc() 98 spin_lock_irqsave(&ctx->wqh.lock, flags); in timerfd_poll() 101 spin_unlock_irqrestore(&ctx->wqh.lock, flags); in timerfd_poll() 116 spin_lock_irq(&ctx->wqh.lock); in timerfd_read() 130 spin_unlock_irq(&ctx->wqh.lock); in timerfd_read() 132 spin_lock_irq(&ctx->wqh.lock); in timerfd_read() 153 spin_unlock_irq(&ctx->wqh.lock); in timerfd_read() 236 spin_lock_irq(&ctx->wqh.lock); in SYSCALL_DEFINE4() 239 spin_unlock_irq(&ctx->wqh.lock); in SYSCALL_DEFINE4() [all …]
|
D | eventpoll.c | 131 spinlock_t lock; member 177 spinlock_t lock; member 319 spin_lock_init(&psw->lock); in ep_poll_safewake_init() 343 spin_lock_irqsave(&psw->lock, flags); in ep_poll_safewake() 354 spin_unlock_irqrestore(&psw->lock, flags); in ep_poll_safewake() 364 spin_unlock_irqrestore(&psw->lock, flags); in ep_poll_safewake() 370 spin_lock_irqsave(&psw->lock, flags); in ep_poll_safewake() 372 spin_unlock_irqrestore(&psw->lock, flags); in ep_poll_safewake() 427 spin_lock_irqsave(&ep->lock, flags); in ep_remove() 430 spin_unlock_irqrestore(&ep->lock, flags); in ep_remove() [all …]
|
/fs/dlm/ |
D | user.c | 59 struct dlm_lock_params32 lock; member 105 kb->i.lock.mode = kb32->i.lock.mode; in compat_input() 106 kb->i.lock.namelen = kb32->i.lock.namelen; in compat_input() 107 kb->i.lock.flags = kb32->i.lock.flags; in compat_input() 108 kb->i.lock.lkid = kb32->i.lock.lkid; in compat_input() 109 kb->i.lock.parent = kb32->i.lock.parent; in compat_input() 110 kb->i.lock.xid = kb32->i.lock.xid; in compat_input() 111 kb->i.lock.timeout = kb32->i.lock.timeout; in compat_input() 112 kb->i.lock.castparam = (void *)(long)kb32->i.lock.castparam; in compat_input() 113 kb->i.lock.castaddr = (void *)(long)kb32->i.lock.castaddr; in compat_input() [all …]
|
/fs/squashfs/ |
D | cache.c | 72 spin_lock(&cache->lock); in squashfs_cache_get() 86 spin_unlock(&cache->lock); in squashfs_cache_get() 88 spin_lock(&cache->lock); in squashfs_cache_get() 118 spin_unlock(&cache->lock); in squashfs_cache_get() 124 spin_lock(&cache->lock); in squashfs_cache_get() 137 spin_unlock(&cache->lock); in squashfs_cache_get() 140 spin_unlock(&cache->lock); in squashfs_cache_get() 162 spin_unlock(&cache->lock); in squashfs_cache_get() 165 spin_unlock(&cache->lock); in squashfs_cache_get() 188 spin_lock(&cache->lock); in squashfs_cache_put() [all …]
|