• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/fs/gfs2/

Lines Matching refs:file

50 struct file gfs2_internal_file_sentinel = {
89 * gfs2_llseek - seek to a location in a file
90 * @file: the file
94 * SEEK_END requires the glock for the file because it references the
95 * file's size.
100 static loff_t gfs2_llseek(struct file *file, loff_t offset, int origin)
102 struct gfs2_inode *ip = GFS2_I(file->f_mapping->host);
110 error = remote_llseek(file, offset, origin);
114 error = remote_llseek(file, offset, origin);
121 * @file: The directory to read from
128 static int gfs2_readdir(struct file *file, void *dirent, filldir_t filldir)
130 struct inode *dir = file->f_mapping->host;
133 u64 offset = file->f_pos;
147 file->f_pos = offset;
196 static int gfs2_get_flags(struct file *filp, u32 __user *ptr)
254 static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask)
316 static int gfs2_set_flags(struct file *filp, u32 __user *ptr)
325 static long gfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
339 * @file: The file to map
345 static int gfs2_mmap(struct file *file, struct vm_area_struct *vma)
347 struct gfs2_inode *ip = GFS2_I(file->f_mapping->host);
373 * gfs2_open - open a file
375 * @file: the struct file for this opening
380 static int gfs2_open(struct inode *inode, struct file *file)
393 gfs2_assert_warn(GFS2_SB(inode), !file->private_data);
394 file->private_data = fp;
402 if (!(file->f_flags & O_LARGEFILE) &&
411 file->f_flags |= O_DIRECT;
421 file->private_data = NULL;
427 * gfs2_close - called to close a struct file
428 * @inode: the inode the struct file belongs to
429 * @file: the struct file being closed
434 static int gfs2_close(struct inode *inode, struct file *file)
439 fp = file->private_data;
440 file->private_data = NULL;
451 * gfs2_fsync - sync the dirty data for a file (across the cluster)
452 * @file: the file that points to the dentry (we ignore this)
469 static int gfs2_fsync(struct file *file, struct dentry *dentry, int datasync)
492 * gfs2_lock - acquire/release a posix lock on a file
493 * @file: the file pointer
500 static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl)
502 struct gfs2_inode *ip = GFS2_I(file->f_mapping->host);
503 struct gfs2_sbd *sdp = GFS2_SB(file->f_mapping->host);
515 posix_test_lock(file, fl);
518 return posix_lock_file_wait(file, fl);
528 return gfs2_lm_plock_get(sdp, &name, file, fl);
530 return gfs2_lm_punlock(sdp, &name, file, fl);
532 return gfs2_lm_plock(sdp, &name, file, cmd, fl);
535 static int do_flock(struct file *file, int cmd, struct file_lock *fl)
537 struct gfs2_file *fp = file->private_data;
539 struct gfs2_inode *ip = GFS2_I(file->f_path.dentry->d_inode);
555 flock_lock_file_wait(file,
575 error = flock_lock_file_wait(file, fl);
584 static void do_unflock(struct file *file, struct file_lock *fl)
586 struct gfs2_file *fp = file->private_data;
590 flock_lock_file_wait(file, fl);
597 * gfs2_flock - acquire/release a flock lock on a file
598 * @file: the file pointer
605 static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl)
607 struct gfs2_inode *ip = GFS2_I(file->f_mapping->host);
608 struct gfs2_sbd *sdp = GFS2_SB(file->f_mapping->host);
616 return flock_lock_file_wait(file, fl);
619 do_unflock(file, fl);
622 return do_flock(file, cmd, fl);