• Home
  • Raw
  • Download

Lines Matching refs:fl

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()
586 res = posix_lock_file_wait(file, fl); in do_vfs_lock()
589 res = flock_lock_file_wait(file, fl); in do_vfs_lock()
601 static int do_unlk(struct file *filp, int cmd, struct file_lock *fl) in do_unlk() argument
619 status = NFS_PROTO(inode)->lock(filp, cmd, fl); in do_unlk()
621 status = do_vfs_lock(filp, fl); in do_unlk()
626 static int do_setlk(struct file *filp, int cmd, struct file_lock *fl) in do_setlk() argument
642 status = NFS_PROTO(inode)->lock(filp, cmd, fl); in do_setlk()
644 status = do_vfs_lock(filp, fl); in do_setlk()
662 static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl) in nfs_lock() argument
670 fl->fl_type, fl->fl_flags, in nfs_lock()
671 (long long)fl->fl_start, (long long)fl->fl_end); in nfs_lock()
676 if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) in nfs_lock()
680 ret = NFS_PROTO(inode)->lock_check_bounds(fl); in nfs_lock()
686 ret = do_getlk(filp, cmd, fl); in nfs_lock()
687 else if (fl->fl_type == F_UNLCK) in nfs_lock()
688 ret = do_unlk(filp, cmd, fl); in nfs_lock()
690 ret = do_setlk(filp, cmd, fl); in nfs_lock()
698 static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl) in nfs_flock() argument
703 fl->fl_type, fl->fl_flags); in nfs_flock()
705 if (!(fl->fl_flags & FL_FLOCK)) in nfs_flock()
709 fl->fl_owner = (fl_owner_t)filp; in nfs_flock()
710 fl->fl_start = 0; in nfs_flock()
711 fl->fl_end = OFFSET_MAX; in nfs_flock()
713 if (fl->fl_type == F_UNLCK) in nfs_flock()
714 return do_unlk(filp, cmd, fl); in nfs_flock()
715 return do_setlk(filp, cmd, fl); in nfs_flock()
722 static int nfs_setlease(struct file *file, long arg, struct file_lock **fl) in nfs_setlease() argument