/fs/ |
D | locks.c | 133 #define IS_POSIX(fl) (fl->fl_flags & FL_POSIX) argument 134 #define IS_FLOCK(fl) (fl->fl_flags & FL_FLOCK) argument 135 #define IS_LEASE(fl) (fl->fl_flags & FL_LEASE) argument 154 static void locks_release_private(struct file_lock *fl) in locks_release_private() argument 156 if (fl->fl_ops) { in locks_release_private() 157 if (fl->fl_ops->fl_release_private) in locks_release_private() 158 fl->fl_ops->fl_release_private(fl); in locks_release_private() 159 fl->fl_ops = NULL; in locks_release_private() 161 if (fl->fl_lmops) { in locks_release_private() 162 if (fl->fl_lmops->fl_release_private) in locks_release_private() [all …]
|
/fs/afs/ |
D | flock.c | 18 static void afs_fl_copy_lock(struct file_lock *new, struct file_lock *fl); 19 static void afs_fl_release_private(struct file_lock *fl); 84 static void afs_grant_locks(struct afs_vnode *vnode, struct file_lock *fl) in afs_grant_locks() argument 88 list_move_tail(&fl->fl_u.afs.link, &vnode->granted_locks); in afs_grant_locks() 89 if (fl->fl_type == F_RDLCK) { in afs_grant_locks() 111 struct file_lock *fl; in afs_lock_work() local 145 fl = list_entry(vnode->granted_locks.next, in afs_lock_work() 147 key = key_get(fl->fl_file->private_data); in afs_lock_work() 179 fl = list_entry(vnode->pending_locks.next, in afs_lock_work() 181 key = key_get(fl->fl_file->private_data); in afs_lock_work() [all …]
|
/fs/lockd/ |
D | clntproc.c | 29 static void nlmclnt_locks_init_private(struct file_lock *fl, struct nlm_host *host); 123 static void nlmclnt_setlockargs(struct nlm_rqst *req, struct file_lock *fl) in nlmclnt_setlockargs() argument 130 memcpy(&lock->fh, NFS_FH(fl->fl_file->f_path.dentry->d_inode), sizeof(struct nfs_fh)); in nlmclnt_setlockargs() 134 (unsigned int)fl->fl_u.nfs_fl.owner->pid, 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() 154 int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl) in nlmclnt_proc() argument [all …]
|
D | svclock.c | 108 struct file_lock *fl; in nlmsvc_lookup_block() local 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() 117 block->b_file, fl->fl_pid, in nlmsvc_lookup_block() 118 (long long)fl->fl_start, in nlmsvc_lookup_block() 119 (long long)fl->fl_end, fl->fl_type, in nlmsvc_lookup_block() 121 if (block->b_file == file && nlm_compare_locks(fl, &lock->fl)) { in nlmsvc_lookup_block() 200 call->a_args.lock.fl.fl_flags |= FL_SLEEP; in nlmsvc_create_block() [all …]
|
D | xdr4.c | 124 struct file_lock *fl = &lock->fl; in nlm4_decode_lock() local 135 locks_init_lock(fl); in nlm4_decode_lock() 136 fl->fl_owner = current->files; in nlm4_decode_lock() 137 fl->fl_pid = (pid_t)lock->svid; in nlm4_decode_lock() 138 fl->fl_flags = FL_POSIX; in nlm4_decode_lock() 139 fl->fl_type = F_RDLCK; /* as good as anything else */ in nlm4_decode_lock() 144 fl->fl_start = s64_to_loff_t(start); in nlm4_decode_lock() 147 fl->fl_end = OFFSET_MAX; in nlm4_decode_lock() 149 fl->fl_end = s64_to_loff_t(end); in nlm4_decode_lock() 159 struct file_lock *fl = &lock->fl; in nlm4_encode_lock() local [all …]
|
D | xdr.c | 123 struct file_lock *fl = &lock->fl; in nlm_decode_lock() local 134 locks_init_lock(fl); in nlm_decode_lock() 135 fl->fl_owner = current->files; in nlm_decode_lock() 136 fl->fl_pid = (pid_t)lock->svid; in nlm_decode_lock() 137 fl->fl_flags = FL_POSIX; in nlm_decode_lock() 138 fl->fl_type = F_RDLCK; /* as good as anything else */ in nlm_decode_lock() 143 fl->fl_start = s32_to_loff_t(start); in nlm_decode_lock() 146 fl->fl_end = OFFSET_MAX; in nlm_decode_lock() 148 fl->fl_end = s32_to_loff_t(end); in nlm_decode_lock() 158 struct file_lock *fl = &lock->fl; in nlm_encode_lock() local [all …]
|
D | svcsubs.c | 167 struct file_lock *fl; in nlm_traverse_locks() local 172 for (fl = inode->i_flock; fl; fl = fl->fl_next) { in nlm_traverse_locks() 173 if (fl->fl_lmops != &nlmsvc_lock_operations) in nlm_traverse_locks() 179 lockhost = (struct nlm_host *) fl->fl_owner; in nlm_traverse_locks() 181 struct file_lock lock = *fl; in nlm_traverse_locks() 223 struct file_lock *fl; in nlm_file_inuse() local 228 for (fl = inode->i_flock; fl; fl = fl->fl_next) { in nlm_file_inuse() 229 if (fl->fl_lmops == &nlmsvc_lock_operations) in nlm_file_inuse()
|
D | clntlock.c | 89 struct nlm_wait *nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl) in nlmclnt_prepare_block() argument 96 block->b_lock = fl; in nlmclnt_prepare_block() 196 const struct file_lock *fl = &lock->fl; in nlmclnt_grant() local 208 if (fl_blocked->fl_start != fl->fl_start) in nlmclnt_grant() 210 if (fl_blocked->fl_end != fl->fl_end) in nlmclnt_grant() 261 struct file_lock *fl, *next; in reclaimer() local 286 list_for_each_entry_safe(fl, next, &host->h_reclaim, fl_u.nfs_fl.list) { in reclaimer() 287 list_del_init(&fl->fl_u.nfs_fl.list); in reclaimer() 297 if (nlmclnt_reclaim(host, fl) != 0) in reclaimer() 299 list_add_tail(&fl->fl_u.nfs_fl.list, &host->h_granted); in reclaimer()
|
/fs/dlm/ |
D | plock.c | 33 void *fl; member 74 int cmd, struct file_lock *fl) in dlm_posix_lock() argument 93 op->info.pid = fl->fl_pid; in dlm_posix_lock() 94 op->info.ex = (fl->fl_type == F_WRLCK); in dlm_posix_lock() 98 op->info.start = fl->fl_start; in dlm_posix_lock() 99 op->info.end = fl->fl_end; in dlm_posix_lock() 100 if (fl->fl_lmops && fl->fl_lmops->fl_grant) { in dlm_posix_lock() 103 op->info.owner = (__u64) fl->fl_pid; in dlm_posix_lock() 104 xop->callback = fl->fl_lmops->fl_grant; in dlm_posix_lock() 106 locks_copy_lock(&xop->flc, fl); in dlm_posix_lock() [all …]
|
/fs/ocfs2/ |
D | locks.c | 40 int cmd, struct file_lock *fl) in ocfs2_do_flock() argument 46 if (fl->fl_type == F_WRLCK) in ocfs2_do_flock() 85 ret = flock_lock_file_wait(file, fl); in ocfs2_do_flock() 93 static int ocfs2_do_funlock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_do_funlock() argument 100 ret = flock_lock_file_wait(file, fl); in ocfs2_do_funlock() 109 int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_flock() argument 114 if (!(fl->fl_flags & FL_FLOCK)) in ocfs2_flock() 121 return flock_lock_file_wait(file, fl); in ocfs2_flock() 123 if (fl->fl_type == F_UNLCK) in ocfs2_flock() 124 return ocfs2_do_funlock(file, cmd, fl); in ocfs2_flock() [all …]
|
D | locks.h | 29 int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl); 30 int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl);
|
D | stack_user.c | 757 struct file_lock *fl) in user_plock() argument 773 fl->fl_type = F_UNLCK; in user_plock() 777 return dlm_posix_get(conn->cc_lockspace, ino, file, fl); in user_plock() 778 else if (fl->fl_type == F_UNLCK) in user_plock() 779 return dlm_posix_unlock(conn->cc_lockspace, ino, file, fl); in user_plock() 781 return dlm_posix_lock(conn->cc_lockspace, ino, file, cmd, fl); in user_plock()
|
D | stackglue.h | 202 struct file_lock *fl); 260 struct file *file, int cmd, struct file_lock *fl);
|
/fs/nfs/ |
D | file.c | 55 static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl); 56 static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl); 57 static int nfs_setlease(struct file *file, long arg, struct file_lock **fl); 553 static int do_getlk(struct file *filp, int cmd, struct file_lock *fl) in do_getlk() argument 560 posix_test_lock(filp, fl); in do_getlk() 561 if (fl->fl_type != F_UNLCK) { in do_getlk() 572 status = NFS_PROTO(inode)->lock(filp, cmd, fl); in do_getlk() 577 fl->fl_type = F_UNLCK; in do_getlk() 581 static int do_vfs_lock(struct file *file, struct file_lock *fl) in do_vfs_lock() argument 584 switch (fl->fl_flags & (FL_POSIX|FL_FLOCK)) { in do_vfs_lock() [all …]
|
D | delegation.c | 70 struct file_lock *fl; in nfs_delegation_claim_locks() local 73 for (fl = inode->i_flock; fl != NULL; fl = fl->fl_next) { in nfs_delegation_claim_locks() 74 if (!(fl->fl_flags & (FL_POSIX|FL_FLOCK))) in nfs_delegation_claim_locks() 76 if (nfs_file_open_context(fl->fl_file) != ctx) in nfs_delegation_claim_locks() 78 status = nfs4_lock_delegation_recall(state, fl); in nfs_delegation_claim_locks()
|
D | nfs4state.c | 626 static void nfs4_fl_release_lock(struct file_lock *fl) in nfs4_fl_release_lock() argument 628 nfs4_put_lock_state(fl->fl_u.nfs4_fl.owner); in nfs4_fl_release_lock() 636 int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl) in nfs4_set_lock_state() argument 640 if (fl->fl_ops != NULL) in nfs4_set_lock_state() 642 lsp = nfs4_get_lock_state(state, fl->fl_owner); in nfs4_set_lock_state() 645 fl->fl_u.nfs4_fl.owner = lsp; in nfs4_set_lock_state() 646 fl->fl_ops = &nfs4_fl_lock_ops; in nfs4_set_lock_state() 841 struct file_lock *fl; in nfs4_reclaim_locks() local 845 for (fl = inode->i_flock; fl != NULL; fl = fl->fl_next) { in nfs4_reclaim_locks() 846 if (!(fl->fl_flags & (FL_POSIX|FL_FLOCK))) in nfs4_reclaim_locks() [all …]
|
D | proc.c | 602 nfs_proc_lock(struct file *filp, int cmd, struct file_lock *fl) in nfs_proc_lock() argument 606 return nlmclnt_proc(NFS_SERVER(inode)->nlm_host, cmd, fl); in nfs_proc_lock() 611 static int nfs_lock_check_bounds(const struct file_lock *fl) in nfs_lock_check_bounds() argument 615 start = (__s32)fl->fl_start; in nfs_lock_check_bounds() 616 if ((loff_t)start != fl->fl_start) in nfs_lock_check_bounds() 619 if (fl->fl_end != OFFSET_MAX) { in nfs_lock_check_bounds() 620 end = (__s32)fl->fl_end; in nfs_lock_check_bounds() 621 if ((loff_t)end != fl->fl_end) in nfs_lock_check_bounds()
|
/fs/xfs/ |
D | xfs_mount.h | 94 #define XFS_SEND_DATA(mp, ev,ip,off,len,fl,lock) \ argument 95 (*(mp)->m_dm_ops->xfs_send_data)(ev,ip,off,len,fl,lock) 96 #define XFS_SEND_MMAP(mp, vma,fl) \ argument 97 (*(mp)->m_dm_ops->xfs_send_mmap)(vma,fl) 100 #define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \ argument 101 (*(mp)->m_dm_ops->xfs_send_namesp)(ev,NULL,b1,r1,b2,r2,n1,n2,mode,rval,fl) 102 #define XFS_SEND_PREUNMOUNT(mp,b1,r1,b2,r2,n1,n2,mode,rval,fl) \ argument 103 (*(mp)->m_dm_ops->xfs_send_namesp)(DM_EVENT_PREUNMOUNT,mp,b1,r1,b2,r2,n1,n2,mode,rval,fl) 106 #define XFS_SEND_UNMOUNT(mp, ip,right,mode,rval,fl) \ argument 107 (*(mp)->m_dm_ops->xfs_send_unmount)(mp,ip,right,mode,rval,fl) [all …]
|
D | xfs_quota.h | 346 #define XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, tp, ip, nblks, ninos, fl) \ argument 347 XFS_DQTRXOP(mp, tp, qo_reserve_quota_nblks, mp, ip, nblks, ninos, fl) 348 #define XFS_TRANS_RESERVE_QUOTA_BYDQUOTS(mp, tp, ud, gd, nb, ni, fl) \ argument 349 XFS_DQTRXOP(mp, tp, qo_reserve_quota_bydquots, mp, ud, gd, nb, ni, fl)
|
D | xfs_rw.c | 288 int64_t fl; in xfs_bioerror_relse() local 294 fl = XFS_BUF_BFLAGS(bp); in xfs_bioerror_relse() 309 if (!(fl & XFS_B_ASYNC)) { in xfs_bioerror_relse()
|
/fs/gfs2/ |
D | ops_file.c | 572 static int gfs2_setlease(struct file *file, long arg, struct file_lock **fl) in gfs2_setlease() argument 583 return generic_setlease(file, arg, fl); in gfs2_setlease() 587 struct file *file, struct file_lock *fl) in gfs2_lm_plock_get() argument 592 sdp->sd_lockstruct.ls_lockspace, name, file, fl); in gfs2_lm_plock_get() 597 struct file *file, int cmd, struct file_lock *fl) in gfs2_lm_plock() argument 602 sdp->sd_lockstruct.ls_lockspace, name, file, cmd, fl); in gfs2_lm_plock() 607 struct file *file, struct file_lock *fl) in gfs2_lm_punlock() argument 612 sdp->sd_lockstruct.ls_lockspace, name, file, fl); in gfs2_lm_punlock() 625 static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl) in gfs2_lock() argument 633 if (!(fl->fl_flags & FL_POSIX)) in gfs2_lock() [all …]
|
/fs/gfs2/locking/dlm/ |
D | mount.c | 237 struct file *file, int cmd, struct file_lock *fl) in gdlm_plock() argument 240 return dlm_posix_lock(ls->dlm_lockspace, name->ln_number, file, cmd, fl); in gdlm_plock() 244 struct file *file, struct file_lock *fl) in gdlm_punlock() argument 247 return dlm_posix_unlock(ls->dlm_lockspace, name->ln_number, file, fl); in gdlm_punlock() 251 struct file *file, struct file_lock *fl) in gdlm_plock_get() argument 254 return dlm_posix_get(ls->dlm_lockspace, name->ln_number, file, fl); in gdlm_plock_get()
|
/fs/fuse/ |
D | file.c | 1277 struct file_lock *fl) in convert_fuse_file_lock() argument 1289 fl->fl_start = ffl->start; in convert_fuse_file_lock() 1290 fl->fl_end = ffl->end; in convert_fuse_file_lock() 1291 fl->fl_pid = ffl->pid; in convert_fuse_file_lock() 1297 fl->fl_type = ffl->type; in convert_fuse_file_lock() 1302 const struct file_lock *fl, int opcode, pid_t pid, in fuse_lk_fill() argument 1311 arg->owner = fuse_lock_owner_id(fc, fl->fl_owner); in fuse_lk_fill() 1312 arg->lk.start = fl->fl_start; in fuse_lk_fill() 1313 arg->lk.end = fl->fl_end; in fuse_lk_fill() 1314 arg->lk.type = fl->fl_type; in fuse_lk_fill() [all …]
|
/fs/nfsd/ |
D | nfs4state.c | 1299 void nfsd_break_deleg_cb(struct file_lock *fl) in nfsd_break_deleg_cb() argument 1301 struct nfs4_delegation *dp= (struct nfs4_delegation *)fl->fl_owner; in nfsd_break_deleg_cb() 1304 dprintk("NFSD nfsd_break_deleg_cb: dp %p fl %p\n",dp,fl); in nfsd_break_deleg_cb() 1328 fl->fl_break_time = 0; in nfsd_break_deleg_cb() 1348 void nfsd_release_deleg_cb(struct file_lock *fl) in nfsd_release_deleg_cb() argument 1350 struct nfs4_delegation *dp = (struct nfs4_delegation *)fl->fl_owner; in nfsd_release_deleg_cb() 1352 …dprintk("NFSD nfsd_release_deleg_cb: fl %p dp %p dl_count %d\n", fl,dp, atomic_read(&dp->dl_count)… in nfsd_release_deleg_cb() 1354 if (!(fl->fl_flags & FL_LEASE) || !dp) in nfsd_release_deleg_cb() 1365 void nfsd_copy_lock_deleg_cb(struct file_lock *new, struct file_lock *fl) in nfsd_copy_lock_deleg_cb() argument 1638 struct file_lock fl, *flp = &fl; in nfs4_open_delegation() local [all …]
|
/fs/9p/ |
D | vfs_file.c | 103 static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_lock() argument 108 P9_DPRINTK(P9_DEBUG_VFS, "filp: %p lock: %p\n", filp, fl); in v9fs_file_lock() 114 if ((IS_SETLK(cmd) || IS_SETLKW(cmd)) && fl->fl_type != F_UNLCK) { in v9fs_file_lock()
|