/fs/ocfs2/dlm/ |
D | dlmast.c | 37 struct dlm_lock *lock); 38 static int dlm_should_cancel_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock); 49 static int dlm_should_cancel_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock) in dlm_should_cancel_bast() argument 52 assert_spin_locked(&lock->spinlock); in dlm_should_cancel_bast() 54 if (lock->ml.highest_blocked == LKM_IVMODE) in dlm_should_cancel_bast() 56 BUG_ON(lock->ml.highest_blocked == LKM_NLMODE); in dlm_should_cancel_bast() 58 if (lock->bast_pending && in dlm_should_cancel_bast() 59 list_empty(&lock->bast_list)) in dlm_should_cancel_bast() 63 if (lock->ml.type == LKM_EXMODE) in dlm_should_cancel_bast() 66 else if (lock->ml.type == LKM_NLMODE) in dlm_should_cancel_bast() [all …]
|
D | dlmlock.c | 47 struct dlm_lock *lock, int flags); 51 static void dlm_lock_detach_lockres(struct dlm_lock *lock); 76 struct dlm_lock *lock) in dlm_can_grant_new_lock() argument 81 if (!dlm_lock_compatible(tmplock->ml.type, lock->ml.type)) in dlm_can_grant_new_lock() 86 if (!dlm_lock_compatible(tmplock->ml.type, lock->ml.type)) in dlm_can_grant_new_lock() 89 lock->ml.type)) in dlm_can_grant_new_lock() 105 struct dlm_lock *lock, int flags) in dlmlock_master() argument 110 mlog(0, "type=%d\n", lock->ml.type); in dlmlock_master() 117 lock->ml.node != dlm->node_num) { in dlmlock_master() 126 if (dlm_can_grant_new_lock(res, lock)) { in dlmlock_master() [all …]
|
D | dlmconvert.c | 45 struct dlm_lock *lock, int flags, 50 struct dlm_lock *lock, int flags, int type); 63 struct dlm_lock *lock, int flags, int type) in dlmconvert_master() argument 74 status = __dlmconvert_master(dlm, res, lock, flags, type, in dlmconvert_master() 85 dlm_queue_ast(dlm, lock); in dlmconvert_master() 106 struct dlm_lock *lock, int flags, in __dlmconvert_master() argument 116 lock->ml.type, lock->ml.convert_type, type); in __dlmconvert_master() 118 spin_lock(&lock->spinlock); in __dlmconvert_master() 121 if (lock->ml.convert_type != LKM_IVMODE) { in __dlmconvert_master() 129 if (!dlm_lock_on_list(&res->granted, lock)) { in __dlmconvert_master() [all …]
|
D | dlmunlock.c | 45 struct dlm_lock *lock, 50 struct dlm_lock *lock, 56 struct dlm_lock *lock, 85 struct dlm_lock *lock, in dlmunlock_common() argument 107 in_use = !list_empty(&lock->ast_list); in dlmunlock_common() 127 spin_lock(&lock->spinlock); in dlmunlock_common() 142 status = dlm_get_cancel_actions(dlm, res, lock, lksb, &actions); in dlmunlock_common() 144 status = dlm_get_unlock_actions(dlm, res, lock, lksb, &actions); in dlmunlock_common() 163 lock->cancel_pending = 1; in dlmunlock_common() 165 lock->unlock_pending = 1; in dlmunlock_common() [all …]
|
D | dlmthread.c | 42 #define dlm_lock_is_remote(dlm, lock) ((lock)->ml.node != (dlm)->node_num) argument 347 struct dlm_lock *lock, *target; in dlm_shuffle_lists() local 374 list_for_each_entry(lock, &res->granted, list) { in dlm_shuffle_lists() 375 if (lock==target) in dlm_shuffle_lists() 377 if (!dlm_lock_compatible(lock->ml.type, in dlm_shuffle_lists() 381 if (lock->ml.highest_blocked == LKM_IVMODE) { in dlm_shuffle_lists() 383 __dlm_queue_bast(dlm, lock); in dlm_shuffle_lists() 386 if (lock->ml.highest_blocked < target->ml.convert_type) in dlm_shuffle_lists() 387 lock->ml.highest_blocked = in dlm_shuffle_lists() 392 list_for_each_entry(lock, &res->converting, list) { in dlm_shuffle_lists() [all …]
|
D | dlmdebug.c | 59 static void __dlm_print_lock(struct dlm_lock *lock) in __dlm_print_lock() argument 61 spin_lock(&lock->spinlock); in __dlm_print_lock() 66 lock->ml.type, lock->ml.convert_type, lock->ml.node, in __dlm_print_lock() 67 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), in __dlm_print_lock() 68 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie)), in __dlm_print_lock() 69 kref_read(&lock->lock_refs), in __dlm_print_lock() 70 (list_empty(&lock->ast_list) ? 'y' : 'n'), in __dlm_print_lock() 71 (lock->ast_pending ? 'y' : 'n'), in __dlm_print_lock() 72 (list_empty(&lock->bast_list) ? 'y' : 'n'), in __dlm_print_lock() 73 (lock->bast_pending ? 'y' : 'n'), in __dlm_print_lock() [all …]
|
D | dlmrecovery.c | 1048 struct dlm_lock *lock; in dlm_move_reco_locks_to_list() local 1057 list_for_each_entry(lock, &res->granted, list) { in dlm_move_reco_locks_to_list() 1058 if (lock->ml.node == dead_node) { in dlm_move_reco_locks_to_list() 1063 list_del_init(&lock->list); in dlm_move_reco_locks_to_list() 1064 dlm_lock_put(lock); in dlm_move_reco_locks_to_list() 1067 dlm_lock_put(lock); in dlm_move_reco_locks_to_list() 1180 static void dlm_prepare_lvb_for_migration(struct dlm_lock *lock, in dlm_prepare_lvb_for_migration() argument 1184 if (!lock->lksb) in dlm_prepare_lvb_for_migration() 1192 if (lock->ml.type != LKM_EXMODE && lock->ml.type != LKM_PRMODE) in dlm_prepare_lvb_for_migration() 1196 memcpy(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN); in dlm_prepare_lvb_for_migration() [all …]
|
/fs/lockd/ |
D | svclock.c | 47 static int nlmsvc_setgrantargs(struct nlm_rqst *call, struct nlm_lock *lock); 145 nlmsvc_lookup_block(struct nlm_file *file, struct nlm_lock *lock) in nlmsvc_lookup_block() argument 151 file, lock->fl.fl_pid, in nlmsvc_lookup_block() 152 (long long)lock->fl.fl_start, in nlmsvc_lookup_block() 153 (long long)lock->fl.fl_end, lock->fl.fl_type); in nlmsvc_lookup_block() 155 fl = &block->b_call->a_args.lock.fl; in nlmsvc_lookup_block() 161 if (block->b_file == file && nlm_compare_locks(fl, &lock->fl)) { in nlmsvc_lookup_block() 217 struct nlm_file *file, struct nlm_lock *lock, in nlmsvc_create_block() argument 235 if (!nlmsvc_setgrantargs(call, lock)) in nlmsvc_create_block() 239 call->a_args.lock.fl.fl_flags |= FL_SLEEP; in nlmsvc_create_block() [all …]
|
D | xdr4.c | 107 nlm4_decode_lock(__be32 *p, struct nlm_lock *lock) in nlm4_decode_lock() argument 109 struct file_lock *fl = &lock->fl; in nlm4_decode_lock() 113 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlm4_decode_lock() 114 &lock->len, NLM_MAXSTRLEN)) in nlm4_decode_lock() 115 || !(p = nlm4_decode_fh(p, &lock->fh)) in nlm4_decode_lock() 116 || !(p = nlm4_decode_oh(p, &lock->oh))) in nlm4_decode_lock() 118 lock->svid = ntohl(*p++); in nlm4_decode_lock() 150 struct file_lock *fl = &resp->lock.fl; in nlm4_encode_testres() 153 *p++ = htonl(resp->lock.svid); in nlm4_encode_testres() 156 if (!(p = xdr_encode_netobj(p, &resp->lock.oh))) in nlm4_encode_testres() [all …]
|
D | clntxdr.c | 61 static void nlm_compute_offsets(const struct nlm_lock *lock, in nlm_compute_offsets() argument 64 const struct file_lock *fl = &lock->fl; in nlm_compute_offsets() 237 const struct nlm_lock *lock = &result->lock; in encode_nlm_holder() local 241 encode_bool(xdr, lock->fl.fl_type == F_RDLCK); in encode_nlm_holder() 242 encode_int32(xdr, lock->svid); in encode_nlm_holder() 243 encode_netobj(xdr, lock->oh.data, lock->oh.len); in encode_nlm_holder() 246 nlm_compute_offsets(lock, &l_offset, &l_len); in encode_nlm_holder() 253 struct nlm_lock *lock = &result->lock; in decode_nlm_holder() local 254 struct file_lock *fl = &lock->fl; in decode_nlm_holder() 260 memset(lock, 0, sizeof(*lock)); in decode_nlm_holder() [all …]
|
D | clnt4xdr.c | 65 static void nlm4_compute_offsets(const struct nlm_lock *lock, in nlm4_compute_offsets() argument 68 const struct file_lock *fl = &lock->fl; in nlm4_compute_offsets() 242 const struct nlm_lock *lock = &result->lock; in encode_nlm4_holder() local 246 encode_bool(xdr, lock->fl.fl_type == F_RDLCK); in encode_nlm4_holder() 247 encode_int32(xdr, lock->svid); in encode_nlm4_holder() 248 encode_netobj(xdr, lock->oh.data, lock->oh.len); in encode_nlm4_holder() 251 nlm4_compute_offsets(lock, &l_offset, &l_len); in encode_nlm4_holder() 258 struct nlm_lock *lock = &result->lock; in decode_nlm4_holder() local 259 struct file_lock *fl = &lock->fl; in decode_nlm4_holder() 266 memset(lock, 0, sizeof(*lock)); in decode_nlm4_holder() [all …]
|
D | xdr.c | 115 nlm_decode_lock(__be32 *p, struct nlm_lock *lock) in nlm_decode_lock() argument 117 struct file_lock *fl = &lock->fl; in nlm_decode_lock() 120 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlm_decode_lock() 121 &lock->len, in nlm_decode_lock() 123 || !(p = nlm_decode_fh(p, &lock->fh)) in nlm_decode_lock() 124 || !(p = nlm_decode_oh(p, &lock->oh))) in nlm_decode_lock() 126 lock->svid = ntohl(*p++); in nlm_decode_lock() 157 struct file_lock *fl = &resp->lock.fl; in nlm_encode_testres() 160 *p++ = htonl(resp->lock.svid); in nlm_encode_testres() 163 if (!(p = xdr_encode_netobj(p, &resp->lock.oh))) in nlm_encode_testres() [all …]
|
D | svc4proc.c | 28 struct nlm_lock *lock = &argp->lock; in nlm4svc_retrieve_args() local 36 if (!(host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len)) in nlm4svc_retrieve_args() 43 if ((error = nlm_lookup_file(rqstp, &file, &lock->fh)) != 0) in nlm4svc_retrieve_args() 48 lock->fl.fl_file = file->f_file; in nlm4svc_retrieve_args() 49 lock->fl.fl_pid = current->tgid; in nlm4svc_retrieve_args() 50 lock->fl.fl_lmops = &nlmsvc_lock_operations; in nlm4svc_retrieve_args() 51 nlmsvc_locks_init_private(&lock->fl, host, (pid_t)lock->svid); in nlm4svc_retrieve_args() 52 if (!lock->fl.fl_owner) { in nlm4svc_retrieve_args() 97 resp->status = nlmsvc_testlock(rqstp, file, host, &argp->lock, &resp->lock, &resp->cookie); in __nlm4svc_proc_test() 103 nlmsvc_release_lockowner(&argp->lock); in __nlm4svc_proc_test() [all …]
|
D | svcproc.c | 57 struct nlm_lock *lock = &argp->lock; in nlmsvc_retrieve_args() local 65 if (!(host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len)) in nlmsvc_retrieve_args() 72 error = cast_status(nlm_lookup_file(rqstp, &file, &lock->fh)); in nlmsvc_retrieve_args() 78 lock->fl.fl_file = file->f_file; in nlmsvc_retrieve_args() 79 lock->fl.fl_pid = current->tgid; in nlmsvc_retrieve_args() 80 lock->fl.fl_lmops = &nlmsvc_lock_operations; in nlmsvc_retrieve_args() 81 nlmsvc_locks_init_private(&lock->fl, host, (pid_t)lock->svid); in nlmsvc_retrieve_args() 82 if (!lock->fl.fl_owner) { in nlmsvc_retrieve_args() 127 …resp->status = cast_status(nlmsvc_testlock(rqstp, file, host, &argp->lock, &resp->lock, &resp->coo… in __nlmsvc_proc_test() 134 nlmsvc_release_lockowner(&argp->lock); in __nlmsvc_proc_test() [all …]
|
/fs/nilfs2/ |
D | alloc.c | 131 spinlock_t *lock) in nilfs_palloc_group_desc_nfrees() argument 135 spin_lock(lock); in nilfs_palloc_group_desc_nfrees() 137 spin_unlock(lock); in nilfs_palloc_group_desc_nfrees() 149 spinlock_t *lock, u32 n) in nilfs_palloc_group_desc_add_entries() argument 153 spin_lock(lock); in nilfs_palloc_group_desc_add_entries() 156 spin_unlock(lock); in nilfs_palloc_group_desc_add_entries() 203 spinlock_t *lock) in nilfs_palloc_get_block() argument 207 spin_lock(lock); in nilfs_palloc_get_block() 211 spin_unlock(lock); in nilfs_palloc_get_block() 214 spin_unlock(lock); in nilfs_palloc_get_block() [all …]
|
/fs/ |
D | fs_struct.c | 20 spin_lock(&fs->lock); in set_fs_root() 25 spin_unlock(&fs->lock); in set_fs_root() 39 spin_lock(&fs->lock); in set_fs_pwd() 44 spin_unlock(&fs->lock); in set_fs_pwd() 71 spin_lock(&fs->lock); in chroot_fs_refs() 80 spin_unlock(&fs->lock); in chroot_fs_refs() 104 spin_lock(&fs->lock); in exit_fs() 107 spin_unlock(&fs->lock); in exit_fs() 121 spin_lock_init(&fs->lock); in copy_fs_struct() 125 spin_lock(&old->lock); in copy_fs_struct() [all …]
|
/fs/xfs/ |
D | xfs_mru_cache.c | 95 spinlock_t lock; /* Lock to protect this struct. */ member 230 __releases(mru->lock) __acquires(mru->lock) in _xfs_mru_cache_clear_reap_list() 247 spin_unlock(&mru->lock); in _xfs_mru_cache_clear_reap_list() 254 spin_lock(&mru->lock); in _xfs_mru_cache_clear_reap_list() 276 spin_lock(&mru->lock); in _xfs_mru_cache_reap() 290 spin_unlock(&mru->lock); in _xfs_mru_cache_reap() 357 spin_lock_init(&mru->lock); in xfs_mru_cache_create() 387 spin_lock(&mru->lock); in xfs_mru_cache_flush() 389 spin_unlock(&mru->lock); in xfs_mru_cache_flush() 391 spin_lock(&mru->lock); in xfs_mru_cache_flush() [all …]
|
/fs/fuse/ |
D | virtio_fs.c | 29 spinlock_t lock; member 115 spin_lock(&fsvq->lock); in virtio_fs_drain_queue() 117 spin_unlock(&fsvq->lock); in virtio_fs_drain_queue() 120 spin_unlock(&fsvq->lock); in virtio_fs_drain_queue() 147 spin_lock(&fsvq->lock); in virtio_fs_start_all_queues() 149 spin_unlock(&fsvq->lock); in virtio_fs_start_all_queues() 245 spin_lock(&fsvq->lock); in virtio_fs_hiprio_done_work() 257 spin_unlock(&fsvq->lock); in virtio_fs_hiprio_done_work() 270 spin_lock(&fsvq->lock); in virtio_fs_request_dispatch_work() 274 spin_unlock(&fsvq->lock); in virtio_fs_request_dispatch_work() [all …]
|
/fs/notify/ |
D | mark.c | 124 assert_spin_locked(&conn->lock); in __fsnotify_recalc_mask() 146 spin_lock(&conn->lock); in fsnotify_recalc_mask() 148 spin_unlock(&conn->lock); in fsnotify_recalc_mask() 245 if (!refcount_dec_and_lock(&mark->refcnt, &conn->lock)) in fsnotify_put_mark() 256 spin_unlock(&conn->lock); in fsnotify_put_mark() 294 spin_lock(&mark->lock); in fsnotify_get_mark_safe() 298 spin_unlock(&mark->lock); in fsnotify_get_mark_safe() 301 spin_unlock(&mark->lock); in fsnotify_get_mark_safe() 380 spin_lock(&mark->lock); in fsnotify_detach_mark() 383 spin_unlock(&mark->lock); in fsnotify_detach_mark() [all …]
|
/fs/btrfs/ |
D | space-info.c | 58 spin_lock_init(&space_info->lock); in create_space_info() 126 spin_lock(&found->lock); in btrfs_update_space_info() 135 spin_unlock(&found->lock); in btrfs_update_space_info() 219 lockdep_assert_held(&space_info->lock); in btrfs_try_granting_tickets() 255 spin_lock(&__rsv->lock); \ 258 spin_unlock(&__rsv->lock); \ 264 lockdep_assert_held(&info->lock); in __btrfs_dump_space_info() 291 spin_lock(&info->lock); in btrfs_dump_space_info() 293 spin_unlock(&info->lock); in btrfs_dump_space_info() 301 spin_lock(&cache->lock); in btrfs_dump_space_info() [all …]
|
D | locking.c | 102 read_unlock(&eb->lock); in btrfs_set_lock_blocking_read() 119 write_unlock(&eb->lock); in btrfs_set_lock_blocking_write() 134 read_lock(&eb->lock); in btrfs_tree_read_lock() 146 read_unlock(&eb->lock); in btrfs_tree_read_lock() 151 read_unlock(&eb->lock); in btrfs_tree_read_lock() 171 read_lock(&eb->lock); in btrfs_tree_read_lock_atomic() 173 read_unlock(&eb->lock); in btrfs_tree_read_lock_atomic() 191 if (!read_trylock(&eb->lock)) in btrfs_try_tree_read_lock() 195 read_unlock(&eb->lock); in btrfs_try_tree_read_lock() 213 write_lock(&eb->lock); in btrfs_try_tree_write_lock() [all …]
|
D | block-rsv.c | 18 spin_lock(&block_rsv->lock); in block_rsv_release_bytes() 38 spin_unlock(&block_rsv->lock); in block_rsv_release_bytes() 43 spin_lock(&dest->lock); in block_rsv_release_bytes() 54 spin_unlock(&dest->lock); in block_rsv_release_bytes() 83 spin_lock_init(&rsv->lock); in btrfs_init_block_rsv() 142 spin_lock(&block_rsv->lock); in btrfs_block_rsv_check() 146 spin_unlock(&block_rsv->lock); in btrfs_block_rsv_check() 161 spin_lock(&block_rsv->lock); in btrfs_block_rsv_refill() 167 spin_unlock(&block_rsv->lock); in btrfs_block_rsv_refill() 209 spin_lock(&block_rsv->lock); in btrfs_block_rsv_use_bytes() [all …]
|
D | block-group.c | 287 spin_lock(&bg->lock); in btrfs_inc_nocow_writers() 292 spin_unlock(&bg->lock); in btrfs_inc_nocow_writers() 364 spin_lock(&cache->lock); in btrfs_get_caching_control() 366 spin_unlock(&cache->lock); in btrfs_get_caching_control() 372 spin_unlock(&cache->lock); in btrfs_get_caching_control() 648 spin_lock(&block_group->lock); in caching_thread() 651 spin_unlock(&block_group->lock); in caching_thread() 657 spin_lock(&block_group->space_info->lock); in caching_thread() 658 spin_lock(&block_group->lock); in caching_thread() 662 spin_unlock(&block_group->lock); in caching_thread() [all …]
|
/fs/btrfs/tests/ |
D | extent-map-tests.c | 69 write_lock(&em_tree->lock); in test_case_1() 71 write_unlock(&em_tree->lock); in test_case_1() 90 write_lock(&em_tree->lock); in test_case_1() 92 write_unlock(&em_tree->lock); in test_case_1() 111 write_lock(&em_tree->lock); in test_case_1() 113 write_unlock(&em_tree->lock); in test_case_1() 157 write_lock(&em_tree->lock); in test_case_2() 159 write_unlock(&em_tree->lock); in test_case_2() 178 write_lock(&em_tree->lock); in test_case_2() 180 write_unlock(&em_tree->lock); in test_case_2() [all …]
|
/fs/orangefs/ |
D | waitqueue.c | 23 __acquires(op->lock); 25 __releases(op->lock); 113 spin_lock(&op->lock); in service_operation() 126 spin_unlock(&op->lock); in service_operation() 155 spin_unlock(&op->lock); in service_operation() 228 spin_lock(&op->lock); in orangefs_cancel_op_in_progress() 237 spin_unlock(&op->lock); in orangefs_cancel_op_in_progress() 251 __releases(op->lock) in orangefs_clean_up_interrupted_operation() 269 spin_unlock(&op->lock); in orangefs_clean_up_interrupted_operation() 276 spin_unlock(&op->lock); in orangefs_clean_up_interrupted_operation() [all …]
|