Lines Matching defs:file
2 /* AFS file locking support
74 struct afs_vnode *vnode = op->file[0].vnode;
179 afs_vnode_commit_status(op, &op->file[0]);
190 * Get a lock on a file
222 * Extend a lock on a file
253 * Release a lock on a file
409 * Check that our view of the file metadata is up to date and check to see
418 /* Make sure we've got a callback on this file and that our view of the
426 * allowed to get a lock on this file.
433 * read-lock a file and WRITE or INSERT perm to write-lock a file.
450 * request a lock on a file on the server
452 static int afs_do_setlk(struct file *file, struct file_lock *fl)
454 struct inode *inode = locks_inode(file);
458 struct key *key = afs_file_key(file);
484 /* AFS3 protocol only supports full-file locks and doesn't provide any
485 * method of upgrade/downgrade, so we need to emulate for partial-file
488 * The OpenAFS client only gets a server lock for a full-file lock and
489 * keeps partial-file locks local. Allow this behaviour to be emulated
588 * callbacks on a file when a lock is released.
610 ret = locks_lock_file_wait(file, fl);
615 /* Again, make sure we've got a callback on this file and, again, make
700 * unlock on a file on the server
702 static int afs_do_unlk(struct file *file, struct file_lock *fl)
704 struct afs_vnode *vnode = AFS_FS_I(locks_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(locks_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(locks_inode(file));
780 return afs_do_getlk(file, fl);
786 ret = afs_do_unlk(file, fl);
788 ret = afs_do_setlk(file, fl);
801 * manage FLOCK locks on a file
803 int afs_flock(struct file *file, int cmd, struct file_lock *fl)
805 struct afs_vnode *vnode = AFS_FS_I(locks_inode(file));
828 ret = afs_do_unlk(file, fl);
830 ret = afs_do_setlk(file, fl);