Searched refs:fl_type (Results 1 - 30 of 30) sorted by relevance

/linux-4.4.14/include/trace/events/
H A Dfilelock.h50 __field(unsigned char, fl_type)
62 __entry->fl_type = fl ? fl->fl_type : 0;
67 TP_printk("fl=0x%p dev=0x%x:0x%x ino=0x%lx fl_next=0x%p fl_owner=0x%p fl_flags=%s fl_type=%s fl_break_time=%lu fl_downgrade_time=%lu",
71 show_fl_type(__entry->fl_type),
103 __field(unsigned char, fl_type)
114 __entry->fl_type = fl ? fl->fl_type : 0;
117 TP_printk("dev=0x%x:0x%x ino=0x%lx wcount=%d dcount=%d icount=%d fl_owner=0x%p fl_flags=%s fl_type=%s",
122 show_fl_type(__entry->fl_type))
/linux-4.4.14/fs/ceph/
H A Dlocks.c66 wait, fl->fl_type); ceph_lock_message()
84 fl->fl_type = F_RDLCK; ceph_lock_message()
86 fl->fl_type = F_WRLCK; ceph_lock_message()
88 fl->fl_type = F_UNLCK; ceph_lock_message()
103 length, wait, fl->fl_type, err); ceph_lock_message()
167 if (__mandatory_lock(file->f_mapping->host) && fl->fl_type != F_UNLCK) ceph_lock()
178 if (F_RDLCK == fl->fl_type) ceph_lock()
180 else if (F_WRLCK == fl->fl_type) ceph_lock()
213 if (__mandatory_lock(file->f_mapping->host) && fl->fl_type != F_UNLCK) ceph_flock()
221 if (F_RDLCK == fl->fl_type) ceph_flock()
223 else if (F_WRLCK == fl->fl_type) ceph_flock()
365 switch (lock->fl_type) { lock_to_ceph_filelock()
376 dout("Have unknown lock type %d", lock->fl_type); lock_to_ceph_filelock()
/linux-4.4.14/fs/ocfs2/
H A Dlocks.c45 if (fl->fl_type == F_WRLCK) ocfs2_do_flock()
71 .fl_type = F_UNLCK, ocfs2_do_flock()
127 if (fl->fl_type == F_UNLCK) ocfs2_flock()
140 if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) ocfs2_lock()
H A Dstack_user.c764 fl->fl_type = F_UNLCK; user_plock()
769 else if (fl->fl_type == F_UNLCK) user_plock()
/linux-4.4.14/fs/9p/
H A Dvfs_file.c139 if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) v9fs_file_lock()
142 if ((IS_SETLK(cmd) || IS_SETLKW(cmd)) && fl->fl_type != F_UNLCK) { v9fs_file_lock()
156 unsigned char fl_type; v9fs_file_do_lock() local
171 switch (fl->fl_type) { v9fs_file_do_lock()
231 if (res < 0 && fl->fl_type != F_UNLCK) { v9fs_file_do_lock()
232 fl_type = fl->fl_type; v9fs_file_do_lock()
233 fl->fl_type = F_UNLCK; v9fs_file_do_lock()
236 fl->fl_type = fl_type; v9fs_file_do_lock()
256 if (fl->fl_type != F_UNLCK) v9fs_file_getlock()
276 fl->fl_type = F_RDLCK; v9fs_file_getlock()
279 fl->fl_type = F_WRLCK; v9fs_file_getlock()
282 fl->fl_type = F_UNLCK; v9fs_file_getlock()
314 if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) v9fs_file_lock_dotl()
317 if ((IS_SETLK(cmd) || IS_SETLKW(cmd)) && fl->fl_type != F_UNLCK) { v9fs_file_lock_dotl()
350 if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) v9fs_file_flock_dotl()
356 if ((IS_SETLK(cmd) || IS_SETLKW(cmd)) && fl->fl_type != F_UNLCK) { v9fs_file_flock_dotl()
/linux-4.4.14/fs/lockd/
H A Dxdr4.c123 fl->fl_type = F_RDLCK; /* as good as anything else */ nlm4_decode_lock()
153 *p++ = (fl->fl_type == F_RDLCK)? xdr_zero : xdr_one; nlm4_encode_testres()
169 resp->status, (int)resp->lock.svid, fl->fl_type, nlm4_encode_testres()
193 argp->lock.fl.fl_type = F_WRLCK; nlm4svc_decode_testargs()
218 argp->lock.fl.fl_type = F_WRLCK; nlm4svc_decode_lockargs()
238 argp->lock.fl.fl_type = F_WRLCK; nlm4svc_decode_cancargs()
248 argp->lock.fl.fl_type = F_UNLCK; nlm4svc_decode_unlockargs()
H A Dxdr.c131 fl->fl_type = F_RDLCK; /* as good as anything else */ nlm_decode_lock()
160 *p++ = (fl->fl_type == F_RDLCK)? xdr_zero : xdr_one; nlm_encode_testres()
196 argp->lock.fl.fl_type = F_WRLCK; nlmsvc_decode_testargs()
221 argp->lock.fl.fl_type = F_WRLCK; nlmsvc_decode_lockargs()
241 argp->lock.fl.fl_type = F_WRLCK; nlmsvc_decode_cancargs()
251 argp->lock.fl.fl_type = F_UNLCK; nlmsvc_decode_unlockargs()
H A Dclntproc.c140 lock->fl.fl_type = fl->fl_type; nlmclnt_setlockargs()
174 if (fl->fl_type != F_UNLCK) { nlmclnt_proc()
426 fl->fl_type = F_UNLCK; nlmclnt_test()
434 fl->fl_type = req->a_res.lock.fl.fl_type; nlmclnt_test()
508 unsigned char fl_type; nlmclnt_lock() local
593 fl_type = fl->fl_type; nlmclnt_lock()
594 fl->fl_type = F_UNLCK; nlmclnt_lock()
598 fl->fl_type = fl_type; nlmclnt_lock()
H A Dclnt4xdr.c268 encode_bool(xdr, lock->fl.fl_type == F_RDLCK); encode_nlm4_holder()
307 fl->fl_type = exclusive != 0 ? F_WRLCK : F_RDLCK; decode_nlm4_holder()
389 encode_bool(xdr, lock->fl.fl_type == F_WRLCK); nlm4_xdr_enc_testargs()
411 encode_bool(xdr, lock->fl.fl_type == F_WRLCK); nlm4_xdr_enc_lockargs()
433 encode_bool(xdr, lock->fl.fl_type == F_WRLCK); nlm4_xdr_enc_cancargs()
H A Dclntxdr.c263 encode_bool(xdr, lock->fl.fl_type == F_RDLCK); encode_nlm_holder()
301 fl->fl_type = exclusive != 0 ? F_WRLCK : F_RDLCK; decode_nlm_holder()
382 encode_bool(xdr, lock->fl.fl_type == F_WRLCK); nlm_xdr_enc_testargs()
404 encode_bool(xdr, lock->fl.fl_type == F_WRLCK); nlm_xdr_enc_lockargs()
426 encode_bool(xdr, lock->fl.fl_type == F_WRLCK); nlm_xdr_enc_cancargs()
H A Dsvclock.c152 (long long)lock->fl.fl_end, lock->fl.fl_type); nlmsvc_lookup_block()
158 (long long)fl->fl_end, fl->fl_type, nlmsvc_lookup_block()
409 lock->fl.fl_type, lock->fl.fl_pid, nlmsvc_lock()
515 lock->fl.fl_type, nlmsvc_testlock()
534 if (lock->fl.fl_type == F_UNLCK) { nlmsvc_testlock()
540 lock->fl.fl_type, (long long)lock->fl.fl_start, nlmsvc_testlock()
546 conflock->fl.fl_type = lock->fl.fl_type; nlmsvc_testlock()
577 lock->fl.fl_type = F_UNLCK; nlmsvc_unlock()
H A Dsvcsubs.c187 lock.fl_type = F_UNLCK; nlm_traverse_locks()
/linux-4.4.14/fs/afs/
H A Dflock.c88 if (fl->fl_type == F_RDLCK) { afs_grant_locks()
91 if (p->fl_type == F_RDLCK) { afs_grant_locks()
181 type = (fl->fl_type == F_RDLCK) ? afs_lock_work()
261 _enter("{%x:%u},%u", vnode->fid.vid, vnode->fid.vnode, fl->fl_type); afs_do_setlk()
275 type = (fl->fl_type == F_RDLCK) ? AFS_LOCK_READ : AFS_LOCK_WRITE; afs_do_setlk()
447 _enter("{%x:%u},%u", vnode->fid.vid, vnode->fid.vnode, fl->fl_type); afs_do_unlk()
484 fl->fl_type = F_UNLCK; afs_do_getlk()
491 if (fl->fl_type == F_UNLCK) { afs_do_getlk()
499 fl->fl_type = F_RDLCK; afs_do_getlk()
501 fl->fl_type = F_WRLCK; afs_do_getlk()
509 _leave(" = %d [%hd]", ret, fl->fl_type); afs_do_getlk()
522 fl->fl_type, fl->fl_flags, afs_lock()
526 if (__mandatory_lock(&vnode->vfs_inode) && fl->fl_type != F_UNLCK) afs_lock()
531 if (fl->fl_type == F_UNLCK) afs_lock()
545 fl->fl_type, fl->fl_flags); afs_flock()
558 if (fl->fl_type == F_UNLCK) afs_flock()
/linux-4.4.14/fs/
H A Dlocks.c154 return fl->fl_type; target_leasetype()
327 new->fl_type = fl->fl_type; locks_copy_conflock()
390 fl->fl_type = type; flock_make_lock()
402 fl->fl_type = type; assign_type()
721 if (sys_fl->fl_type == F_WRLCK) locks_conflict()
723 if (caller_fl->fl_type == F_WRLCK) locks_conflict()
756 if ((caller_fl->fl_type & LOCK_MAND) || (sys_fl->fl_type & LOCK_MAND)) flock_locks_conflict()
771 fl->fl_type = F_UNLCK; posix_test_lock()
784 fl->fl_type = F_UNLCK; posix_test_lock()
878 ctx = locks_get_lock_context(inode, request->fl_type); flock_lock_inode()
880 if (request->fl_type != F_UNLCK) flock_lock_inode()
885 if (!(request->fl_flags & FL_ACCESS) && (request->fl_type != F_UNLCK)) { flock_lock_inode()
898 if (request->fl_type == fl->fl_type) flock_lock_inode()
905 if (request->fl_type == F_UNLCK) { flock_lock_inode()
949 ctx = locks_get_lock_context(inode, request->fl_type); __posix_lock_file()
951 return (request->fl_type == F_UNLCK) ? 0 : -ENOMEM; __posix_lock_file()
960 (request->fl_type != F_UNLCK || __posix_lock_file()
972 if (request->fl_type != F_UNLCK) { __posix_lock_file()
1013 if (request->fl_type == fl->fl_type) { __posix_lock_file()
1053 if (request->fl_type == F_UNLCK) __posix_lock_file()
1103 if (request->fl_type == F_UNLCK) { __posix_lock_file()
1255 fl.fl_type = (read_write == FLOCK_VERIFY_WRITE) ? F_WRLCK : F_RDLCK; locks_mandatory_area()
1509 if (fl->fl_type == F_WRLCK) lease_get_mtime()
1952 error = security_file_lock(f.file, lock->fl_type); SYSCALL_DEFINE2()
1978 * setting conf->fl_type to something other than F_UNLCK.
2006 flock->l_type = fl->fl_type; posix_lock_to_flock()
2018 flock->l_type = fl->fl_type; posix_lock_to_flock64()
2056 flock.l_type = file_lock.fl_type; fcntl_getlk()
2057 if (file_lock.fl_type != F_UNLCK) { fcntl_getlk()
2118 error = security_file_lock(filp, fl->fl_type); do_lock_file_wait()
2141 switch (fl->fl_type) { check_fmode_for_setlk()
2226 if (!error && file_lock->fl_type != F_UNLCK) { fcntl_setlk()
2236 file_lock->fl_type = F_UNLCK; fcntl_setlk()
2282 flock.l_type = file_lock.fl_type; fcntl_getlk64()
2283 if (file_lock.fl_type != F_UNLCK) fcntl_getlk64()
2368 if (!error && file_lock->fl_type != F_UNLCK) { fcntl_setlk64()
2378 file_lock->fl_type = F_UNLCK; fcntl_setlk64()
2409 lock.fl_type = F_UNLCK; locks_remove_posix()
2436 .fl_type = F_UNLCK, locks_remove_flock()
2565 if (fl->fl_type & LOCK_MAND) { lock_get_status()
2585 if (fl->fl_type & LOCK_MAND) { lock_get_status()
2587 (fl->fl_type & LOCK_READ) lock_get_status()
2588 ? (fl->fl_type & LOCK_WRITE) ? "RW " : "READ " lock_get_status()
2589 : (fl->fl_type & LOCK_WRITE) ? "WRITE" : "NONE "); lock_get_status()
2593 ? (fl->fl_type == F_UNLCK) ? "UNLCK" : "READ " lock_get_status()
2594 : (fl->fl_type == F_WRLCK) ? "WRITE" : "READ "); lock_get_status()
/linux-4.4.14/fs/nfs/
H A Dfile.c715 unsigned int saved_type = fl->fl_type; do_getlk()
719 if (fl->fl_type != F_UNLCK) { do_getlk()
723 fl->fl_type = saved_type; do_getlk()
735 fl->fl_type = F_UNLCK; do_getlk()
838 filp, fl->fl_type, fl->fl_flags, nfs_lock()
844 if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) nfs_lock()
858 else if (fl->fl_type == F_UNLCK) nfs_lock()
876 filp, fl->fl_type, fl->fl_flags); nfs_flock()
887 if (fl->fl_type & LOCK_MAND) nfs_flock()
894 if (fl->fl_type == F_UNLCK) nfs_flock()
H A Dwrite.c1201 fl->fl_type == F_WRLCK; is_whole_file_wrlock()
1239 if (fl->fl_type == F_WRLCK) nfs_can_extend_write()
H A Dnfs4trace.h533 __entry->type = request->fl_type;
H A Dnfs4xdr.c1283 if (fl->fl_type == F_RDLCK) nfs4_lock_type()
4917 fl->fl_type = F_WRLCK; decode_lock_denied()
4919 fl->fl_type = F_RDLCK; decode_lock_denied()
H A Dnfs4proc.c5488 request->fl_type = F_UNLCK; _nfs4_proc_getlk()
5644 fl->fl_type = F_UNLCK; nfs4_do_unlck()
6123 if (request->fl_type == F_UNLCK) { nfs4_proc_lock()
6135 switch (request->fl_type) { nfs4_proc_lock()
/linux-4.4.14/include/linux/lockd/
H A Dlockd.h362 &&(fl1->fl_type == fl2->fl_type || fl2->fl_type == F_UNLCK); nlm_compare_locks()
/linux-4.4.14/fs/dlm/
H A Dplock.c125 op->info.ex = (fl->fl_type == F_WRLCK); dlm_posix_lock()
337 op->info.ex = (fl->fl_type == F_WRLCK); dlm_posix_get()
363 fl->fl_type = F_UNLCK; dlm_posix_get()
368 fl->fl_type = (op->info.ex) ? F_WRLCK : F_RDLCK; dlm_posix_get()
/linux-4.4.14/fs/gfs2/
H A Dfile.c993 if (__mandatory_lock(&ip->i_inode) && fl->fl_type != F_UNLCK) gfs2_lock()
999 fl->fl_type = F_UNLCK; gfs2_lock()
1002 if (fl->fl_type == F_UNLCK) gfs2_lock()
1008 else if (fl->fl_type == F_UNLCK) gfs2_lock()
1025 state = (fl->fl_type == F_WRLCK) ? LM_ST_EXCLUSIVE : LM_ST_SHARED; do_flock()
1035 &(struct file_lock){.fl_type = F_UNLCK}); do_flock()
1095 if (fl->fl_type & LOCK_MAND) gfs2_flock()
1098 if (fl->fl_type == F_UNLCK) { gfs2_flock()
/linux-4.4.14/drivers/staging/lustre/lustre/ldlm/
H A Dldlm_flock.c542 /* The old mode was saved in getlk->fl_type so that if the mode ldlm_flock_completion_ast()
544 ldlm_flock_destroy(lock, getlk->fl_type, LDLM_FL_WAIT_NOREPROC); ldlm_flock_completion_ast()
547 getlk->fl_type = F_RDLCK; ldlm_flock_completion_ast()
550 getlk->fl_type = F_WRLCK; ldlm_flock_completion_ast()
553 getlk->fl_type = F_UNLCK; ldlm_flock_completion_ast()
/linux-4.4.14/fs/nfsd/
H A Dnfs4layouts.c168 fl->fl_type = F_RDLCK; nfsd4_layout_setlease()
174 status = vfs_setlease(fl->fl_file, fl->fl_type, &fl, NULL); nfsd4_layout_setlease()
H A Dnfs4state.c4029 fl->fl_type = flag == NFS4_OPEN_DELEGATE_READ? F_RDLCK: F_WRLCK; nfs4_alloc_init_lease()
4066 status = vfs_setlease(filp, fl->fl_type, &fl, NULL); nfs4_setlease()
5296 if (fl->fl_type != F_RDLCK) nfs4_set_lock_denied()
5615 file_lock->fl_type = F_RDLCK; nfsd4_lock()
5624 file_lock->fl_type = F_WRLCK; nfsd4_lock()
5755 file_lock->fl_type = F_RDLCK; nfsd4_lockt()
5759 file_lock->fl_type = F_WRLCK; nfsd4_lockt()
5782 if (file_lock->fl_type != F_UNLCK) { nfsd4_lockt()
5829 file_lock->fl_type = F_UNLCK; nfsd4_locku()
/linux-4.4.14/fs/cifs/
H A Dfile.c914 flock->fl_type = F_RDLCK; cifs_lock_test()
916 flock->fl_type = F_WRLCK; cifs_lock_test()
920 flock->fl_type = F_UNLCK; cifs_lock_test()
994 unsigned char saved_type = flock->fl_type; cifs_posix_lock_test()
1002 if (flock->fl_type == F_UNLCK && !cinode->can_cache_brlcks) { cifs_posix_lock_test()
1003 flock->fl_type = saved_type; cifs_posix_lock_test()
1176 if (flock->fl_type == F_RDLCK || flock->fl_type == F_SHLCK) cifs_push_posix_locks()
1261 if (flock->fl_type == F_WRLCK) { cifs_read_flock()
1265 } else if (flock->fl_type == F_UNLCK) { cifs_read_flock()
1270 } else if (flock->fl_type == F_RDLCK) { cifs_read_flock()
1274 } else if (flock->fl_type == F_EXLCK) { cifs_read_flock()
1278 } else if (flock->fl_type == F_SHLCK) { cifs_read_flock()
1324 flock->fl_type = F_UNLCK; cifs_getlk()
1332 flock->fl_type = F_WRLCK; cifs_getlk()
1344 flock->fl_type = F_RDLCK; cifs_getlk()
1349 flock->fl_type = F_WRLCK; cifs_getlk()
1577 cmd, flock->fl_flags, flock->fl_type, cifs_lock()
H A Dcifssmb.c2502 pLockData->fl_type = F_UNLCK; CIFSSMBPosixLock()
2506 pLockData->fl_type = F_RDLCK; CIFSSMBPosixLock()
2509 pLockData->fl_type = F_WRLCK; CIFSSMBPosixLock()
/linux-4.4.14/drivers/staging/lustre/lustre/llite/
H A Dfile.c2690 switch (file_lock->fl_type) { ll_file_flock()
2710 file_lock->fl_type); ll_file_flock()
2734 file_lock->fl_type = einfo.ei_mode; ll_file_flock()
2753 if ((rc == 0 || file_lock->fl_type == F_UNLCK) && ll_file_flock()
2757 if (rc2 && file_lock->fl_type != F_UNLCK) { ll_file_flock()
/linux-4.4.14/fs/fuse/
H A Dfile.c2092 fl->fl_type = ffl->type; convert_fuse_file_lock()
2109 inarg->lk.type = fl->fl_type; fuse_lk_fill()
2147 pid_t pid = fl->fl_type != F_UNLCK ? current->tgid : 0; fuse_setlk()
/linux-4.4.14/include/linux/
H A Dfs.h986 unsigned char fl_type; member in struct:file_lock

Completed in 1139 milliseconds