Home
last modified time | relevance | path

Searched refs:flctx (Results 1 – 9 of 9) sorted by relevance

/linux-6.15/fs/lockd/
H A Dsvcsubs.c213 struct file_lock_context *flctx = locks_inode_context(inode); in nlm_traverse_locks() local
216 if (!flctx || list_empty_careful(&flctx->flc_posix)) in nlm_traverse_locks()
220 spin_lock(&flctx->flc_lock); in nlm_traverse_locks()
221 for_each_file_lock(fl, &flctx->flc_posix) { in nlm_traverse_locks()
231 spin_unlock(&flctx->flc_lock); in nlm_traverse_locks()
237 spin_unlock(&flctx->flc_lock); in nlm_traverse_locks()
273 if (flctx && !list_empty_careful(&flctx->flc_posix)) { in nlm_file_inuse()
274 spin_lock(&flctx->flc_lock); in nlm_file_inuse()
275 for_each_file_lock(fl, &flctx->flc_posix) { in nlm_file_inuse()
277 spin_unlock(&flctx->flc_lock); in nlm_file_inuse()
[all …]
/linux-6.15/include/linux/
H A Dfilelock.h224 bool locks_owner_has_blockers(struct file_lock_context *flctx,
403 static inline bool locks_owner_has_blockers(struct file_lock_context *flctx, in locks_owner_has_blockers() argument
428 struct file_lock_context *flctx; in break_lease() local
436 flctx = READ_ONCE(inode->i_flctx); in break_lease()
437 if (!flctx) in break_lease()
440 if (!list_empty_careful(&flctx->flc_lease)) in break_lease()
447 struct file_lock_context *flctx; in break_deleg() local
455 flctx = READ_ONCE(inode->i_flctx); in break_deleg()
456 if (!flctx) in break_deleg()
459 if (!list_empty_careful(&flctx->flc_lease)) in break_deleg()
/linux-6.15/fs/nfs/
H A Dwrite.c1190 if (l_ctx && flctx && in nfs_flush_incompatible()
1191 !(list_empty_careful(&flctx->flc_posix) && in nfs_flush_incompatible()
1192 list_empty_careful(&flctx->flc_flock))) { in nfs_flush_incompatible()
1321 if (!flctx || (list_empty_careful(&flctx->flc_flock) && in nfs_can_extend_write()
1322 list_empty_careful(&flctx->flc_posix))) in nfs_can_extend_write()
1327 spin_lock(&flctx->flc_lock); in nfs_can_extend_write()
1328 if (!list_empty(&flctx->flc_posix)) { in nfs_can_extend_write()
1329 fl = list_first_entry(&flctx->flc_posix, struct file_lock, in nfs_can_extend_write()
1333 } else if (!list_empty(&flctx->flc_flock)) { in nfs_can_extend_write()
1334 fl = list_first_entry(&flctx->flc_flock, struct file_lock, in nfs_can_extend_write()
[all …]
H A Ddelegation.c153 struct file_lock_context *flctx = locks_inode_context(inode); in nfs_delegation_claim_locks() local
157 if (flctx == NULL) in nfs_delegation_claim_locks()
160 list = &flctx->flc_posix; in nfs_delegation_claim_locks()
161 spin_lock(&flctx->flc_lock); in nfs_delegation_claim_locks()
166 spin_unlock(&flctx->flc_lock); in nfs_delegation_claim_locks()
170 spin_lock(&flctx->flc_lock); in nfs_delegation_claim_locks()
172 if (list == &flctx->flc_posix) { in nfs_delegation_claim_locks()
173 list = &flctx->flc_flock; in nfs_delegation_claim_locks()
176 spin_unlock(&flctx->flc_lock); in nfs_delegation_claim_locks()
H A Dpagelist.c1079 struct file_lock_context *flctx; in nfs_coalesce_size() local
1084 flctx = locks_inode_context(d_inode(nfs_req_openctx(req)->dentry)); in nfs_coalesce_size()
1085 if (flctx != NULL && in nfs_coalesce_size()
1086 !(list_empty_careful(&flctx->flc_posix) && in nfs_coalesce_size()
1087 list_empty_careful(&flctx->flc_flock)) && in nfs_coalesce_size()
H A Dnfs4state.c1506 struct file_lock_context *flctx = locks_inode_context(inode); in nfs4_reclaim_locks() local
1509 if (flctx == NULL) in nfs4_reclaim_locks()
1512 list = &flctx->flc_posix; in nfs4_reclaim_locks()
1516 spin_lock(&flctx->flc_lock); in nfs4_reclaim_locks()
1521 spin_unlock(&flctx->flc_lock); in nfs4_reclaim_locks()
1552 spin_lock(&flctx->flc_lock); in nfs4_reclaim_locks()
1554 if (list == &flctx->flc_posix) { in nfs4_reclaim_locks()
1555 list = &flctx->flc_flock; in nfs4_reclaim_locks()
1558 spin_unlock(&flctx->flc_lock); in nfs4_reclaim_locks()
/linux-6.15/fs/
H A Dlocks.c331 bool locks_owner_has_blockers(struct file_lock_context *flctx, fl_owner_t owner) in locks_owner_has_blockers() argument
335 spin_lock(&flctx->flc_lock); in locks_owner_has_blockers()
336 list_for_each_entry(flc, &flctx->flc_posix, flc_list) { in locks_owner_has_blockers()
340 spin_unlock(&flctx->flc_lock); in locks_owner_has_blockers()
344 spin_unlock(&flctx->flc_lock); in locks_owner_has_blockers()
2641 locks_remove_flock(struct file *filp, struct file_lock_context *flctx) in locks_remove_flock() argument
2646 if (list_empty(&flctx->flc_flock)) in locks_remove_flock()
/linux-6.15/fs/smb/client/
H A Dfile.c1836 struct file_lock_context *flctx = locks_inode_context(inode); in cifs_push_posix_locks() local
1845 if (!flctx) in cifs_push_posix_locks()
1848 spin_lock(&flctx->flc_lock); in cifs_push_posix_locks()
1849 list_for_each(el, &flctx->flc_posix) { in cifs_push_posix_locks()
1852 spin_unlock(&flctx->flc_lock); in cifs_push_posix_locks()
1871 spin_lock(&flctx->flc_lock); in cifs_push_posix_locks()
1872 for_each_file_lock(flock, &flctx->flc_posix) { in cifs_push_posix_locks()
1895 spin_unlock(&flctx->flc_lock); in cifs_push_posix_locks()
/linux-6.15/fs/nfsd/
H A Dnfs4state.c8561 struct file_lock_context *flctx; in check_for_locks() local
8572 flctx = locks_inode_context(inode); in check_for_locks()
8574 if (flctx && !list_empty_careful(&flctx->flc_posix)) { in check_for_locks()
8575 spin_lock(&flctx->flc_lock); in check_for_locks()
8576 for_each_file_lock(fl, &flctx->flc_posix) { in check_for_locks()
8582 spin_unlock(&flctx->flc_lock); in check_for_locks()