aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/ops_file.c')
-rw-r--r--fs/gfs2/ops_file.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index 9dcf72aa9f66..b551074a3c98 100644
--- a/fs/gfs2/ops_file.c
+++ b/fs/gfs2/ops_file.c
@@ -94,12 +94,12 @@ static int gfs2_read_actor(read_descriptor_t *desc, struct page *page,
94 94
95 kaddr = kmap(page); 95 kaddr = kmap(page);
96 memcpy(desc->arg.buf, kaddr + offset, size); 96 memcpy(desc->arg.buf, kaddr + offset, size);
97 kunmap(page); 97 kunmap(page);
98 98
99 desc->count = count - size; 99 desc->count = count - size;
100 desc->written += size; 100 desc->written += size;
101 desc->arg.buf += size; 101 desc->arg.buf += size;
102 return size; 102 return size;
103} 103}
104 104
105int gfs2_internal_read(struct gfs2_inode *ip, struct file_ra_state *ra_state, 105int gfs2_internal_read(struct gfs2_inode *ip, struct file_ra_state *ra_state,
@@ -700,7 +700,7 @@ static int do_flock(struct file *file, int cmd, struct file_lock *fl)
700 int error = 0; 700 int error = 0;
701 701
702 state = (fl->fl_type == F_WRLCK) ? LM_ST_EXCLUSIVE : LM_ST_SHARED; 702 state = (fl->fl_type == F_WRLCK) ? LM_ST_EXCLUSIVE : LM_ST_SHARED;
703 flags = ((IS_SETLKW(cmd)) ? 0 : LM_FLAG_TRY) | GL_EXACT | GL_NOCACHE; 703 flags = (IS_SETLKW(cmd) ? 0 : LM_FLAG_TRY) | GL_EXACT | GL_NOCACHE;
704 704
705 mutex_lock(&fp->f_fl_mutex); 705 mutex_lock(&fp->f_fl_mutex);
706 706
@@ -780,32 +780,32 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl)
780} 780}
781 781
782const struct file_operations gfs2_file_fops = { 782const struct file_operations gfs2_file_fops = {
783 .llseek = gfs2_llseek, 783 .llseek = gfs2_llseek,
784 .read = generic_file_read, 784 .read = generic_file_read,
785 .readv = generic_file_readv, 785 .readv = generic_file_readv,
786 .aio_read = generic_file_aio_read, 786 .aio_read = generic_file_aio_read,
787 .write = generic_file_write, 787 .write = generic_file_write,
788 .writev = generic_file_writev, 788 .writev = generic_file_writev,
789 .aio_write = generic_file_aio_write, 789 .aio_write = generic_file_aio_write,
790 .unlocked_ioctl = gfs2_ioctl, 790 .unlocked_ioctl = gfs2_ioctl,
791 .mmap = gfs2_mmap, 791 .mmap = gfs2_mmap,
792 .open = gfs2_open, 792 .open = gfs2_open,
793 .release = gfs2_close, 793 .release = gfs2_close,
794 .fsync = gfs2_fsync, 794 .fsync = gfs2_fsync,
795 .lock = gfs2_lock, 795 .lock = gfs2_lock,
796 .sendfile = generic_file_sendfile, 796 .sendfile = generic_file_sendfile,
797 .flock = gfs2_flock, 797 .flock = gfs2_flock,
798 .splice_read = generic_file_splice_read, 798 .splice_read = generic_file_splice_read,
799 .splice_write = generic_file_splice_write, 799 .splice_write = generic_file_splice_write,
800}; 800};
801 801
802const struct file_operations gfs2_dir_fops = { 802const struct file_operations gfs2_dir_fops = {
803 .readdir = gfs2_readdir, 803 .readdir = gfs2_readdir,
804 .unlocked_ioctl = gfs2_ioctl, 804 .unlocked_ioctl = gfs2_ioctl,
805 .open = gfs2_open, 805 .open = gfs2_open,
806 .release = gfs2_close, 806 .release = gfs2_close,
807 .fsync = gfs2_fsync, 807 .fsync = gfs2_fsync,
808 .lock = gfs2_lock, 808 .lock = gfs2_lock,
809 .flock = gfs2_flock, 809 .flock = gfs2_flock,
810}; 810};
811 811