[GFS2] Add generation number
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / gfs2 / ops_file.c
index 5e754198f5bbcd5f111126e1b41185c4232cba8e..26f1d3249b0fce0803a77a67337d27f1128d8dd2 100644 (file)
@@ -333,7 +333,7 @@ static int filldir_reg_func(void *opaque, const char *name, unsigned int length,
        int error;
 
        error = fdr->fdr_filldir(fdr->fdr_opaque, name, length, offset,
-                                inum->no_formal_ino, type);
+                                inum->no_addr, type);
        if (error)
                return 1;
 
@@ -859,24 +859,6 @@ static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl)
                return gfs2_lm_plock(sdp, &name, file, cmd, fl);
 }
 
-/**
- * gfs2_sendfile - Send bytes to a file or socket
- * @in_file: The file to read from
- * @out_file: The file to write to
- * @count: The amount of data
- * @offset: The beginning file offset
- *
- * Outputs: offset - updated according to number of bytes read
- *
- * Returns: The number of bytes sent, errno on failure
- */
-
-static ssize_t gfs2_sendfile(struct file *in_file, loff_t *offset, size_t count,
-                            read_actor_t actor, void *target)
-{
-       return generic_file_sendfile(in_file, offset, count, actor, target);
-}
-
 static int do_flock(struct file *file, int cmd, struct file_lock *fl)
 {
        struct gfs2_file *fp = file->private_data;
@@ -968,7 +950,7 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl)
                return do_flock(file, cmd, fl);
 }
 
-struct file_operations gfs2_file_fops = {
+const struct file_operations gfs2_file_fops = {
        .llseek = gfs2_llseek,
        .read = gfs2_read,
        .readv = gfs2_file_readv,
@@ -982,13 +964,13 @@ struct file_operations gfs2_file_fops = {
        .release = gfs2_close,
        .fsync = gfs2_fsync,
        .lock = gfs2_lock,
-       .sendfile = gfs2_sendfile,
+       .sendfile = generic_file_sendfile,
        .flock = gfs2_flock,
        .splice_read = generic_file_splice_read,
        .splice_write = generic_file_splice_write,
 };
 
-struct file_operations gfs2_dir_fops = {
+const struct file_operations gfs2_dir_fops = {
        .readdir = gfs2_readdir,
        .unlocked_ioctl = gfs2_ioctl,
        .open = gfs2_open,