Lines Matching full:file

2 /* AFS file locking support
74 struct afs_vnode *vnode = op->file[0].vnode;
178 afs_vnode_commit_status(op, &op->file[0]);
189 * Get a lock on a file
221 * Extend a lock on a file
252 * Release a lock on a file
408 * Check that our view of the file metadata is up to date and check to see
417 /* Make sure we've got a callback on this file and that our view of the
425 * allowed to get a lock on this file.
432 * read-lock a file and WRITE or INSERT perm to write-lock a file.
449 * request a lock on a file on the server
451 static int afs_do_setlk(struct file *file, struct file_lock *fl)
453 struct inode *inode = file_inode(file);
457 struct key *key = afs_file_key(file);
483 /* AFS3 protocol only supports full-file locks and doesn't provide any
484 * method of upgrade/downgrade, so we need to emulate for partial-file
487 * The OpenAFS client only gets a server lock for a full-file lock and
488 * keeps partial-file locks local. Allow this behaviour to be emulated
587 * callbacks on a file when a lock is released.
609 ret = locks_lock_file_wait(file, fl);
614 /* Again, make sure we've got a callback on this file and, again, make
699 * unlock on a file on the server
701 static int afs_do_unlk(struct file *file, struct file_lock *fl)
703 struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
712 vfs_fsync(file, 0);
714 ret = locks_lock_file_wait(file, fl);
722 static int afs_do_getlk(struct file *file, struct file_lock *fl)
724 struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
725 struct key *key = afs_file_key(file);
736 posix_test_lock(file, fl);
762 * manage POSIX locks on a file
764 int afs_lock(struct file *file, int cmd, struct file_lock *fl)
766 struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
776 return afs_do_getlk(file, fl);
782 ret = afs_do_unlk(file, fl);
784 ret = afs_do_setlk(file, fl);
797 * manage FLOCK locks on a file
799 int afs_flock(struct file *file, int cmd, struct file_lock *fl)
801 struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
824 ret = afs_do_unlk(file, fl);
826 ret = afs_do_setlk(file, fl);