return rc;
}
-static struct file_operations kgn_mdd_fops = {
- .owner = THIS_MODULE,
- .open = kgnilnd_mdd_seq_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = seq_release,
+static const struct file_operations kgn_mdd_fops = {
+ .owner = THIS_MODULE,
+ .open = kgnilnd_mdd_seq_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
};
typedef struct {
return rc;
}
-static struct file_operations kgn_smsg_fops = {
- .owner = THIS_MODULE,
- .open = kgnilnd_smsg_seq_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = seq_release,
+static const struct file_operations kgn_smsg_fops = {
+ .owner = THIS_MODULE,
+ .open = kgnilnd_smsg_seq_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
};
typedef struct {
return rc;
}
-static struct file_operations kgn_conn_fops = {
- .owner = THIS_MODULE,
- .open = kgnilnd_conn_seq_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = seq_release,
+static const struct file_operations kgn_conn_fops = {
+ .owner = THIS_MODULE,
+ .open = kgnilnd_conn_seq_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
};
typedef struct {
return rc;
}
-static struct file_operations kgn_peer_fops = {
- .owner = THIS_MODULE,
- .open = kgnilnd_peer_seq_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = seq_release,
+static const struct file_operations kgn_peer_fops = {
+ .owner = THIS_MODULE,
+ .open = kgnilnd_peer_seq_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
};
static struct proc_dir_entry *kgn_proc_root;
}
/* -o localflock - only provides locally consistent flock locks */
-struct file_operations ll_file_operations = {
+const struct file_operations ll_file_operations = {
#ifdef HAVE_FILE_OPERATIONS_READ_WRITE_ITER
# ifdef HAVE_SYNC_READ_WRITE
.read = new_sync_read,
.fallocate = ll_fallocate,
};
-struct file_operations ll_file_operations_flock = {
+const struct file_operations ll_file_operations_flock = {
#ifdef HAVE_FILE_OPERATIONS_READ_WRITE_ITER
# ifdef HAVE_SYNC_READ_WRITE
.read = new_sync_read,
};
/* These are for -o noflock - to return ENOSYS on flock calls */
-struct file_operations ll_file_operations_noflock = {
+const struct file_operations ll_file_operations_noflock = {
#ifdef HAVE_FILE_OPERATIONS_READ_WRITE_ITER
# ifdef HAVE_SYNC_READ_WRITE
.read = new_sync_read,
.fallocate = ll_fallocate,
};
-struct inode_operations ll_file_inode_operations = {
+const struct inode_operations ll_file_inode_operations = {
.setattr = ll_setattr,
.getattr = ll_getattr,
.permission = ll_inode_permission,
struct dentry *ll_debugfs_entry;
struct lu_fid ll_root_fid; /* root object fid */
- int ll_flags;
+ int ll_flags;
unsigned int ll_xattr_cache_enabled:1,
ll_xattr_cache_set:1, /* already set to 0/1 */
ll_client_common_fill_super_succeeded:1,
ll_checksum_set:1;
- struct lustre_client_ocd ll_lco;
+ struct lustre_client_ocd ll_lco;
- struct lprocfs_stats *ll_stats; /* lprocfs stats counter */
+ struct lprocfs_stats *ll_stats; /* lprocfs stats counter */
/* Used to track "unstable" pages on a client, and maintain a
* LRU list of clean pages. An "unstable" page is defined as
* but is uncommitted to stable storage. */
struct cl_client_cache *ll_cache;
- struct lprocfs_stats *ll_ra_stats;
-
- struct ll_ra_info ll_ra_info;
- unsigned int ll_namelen;
- struct file_operations *ll_fop;
-
- struct lu_site *ll_site;
- struct cl_device *ll_cl;
- /* Statistics */
- struct ll_rw_extents_info ll_rw_extents_info;
- int ll_extent_process_count;
- struct ll_rw_process_info ll_rw_process_info[LL_PROCESS_HIST_MAX];
- unsigned int ll_offset_process_count;
- struct ll_rw_process_info ll_rw_offset_info[LL_OFFSET_HIST_MAX];
- unsigned int ll_rw_offset_entry_count;
- int ll_stats_track_id;
- enum stats_track_type ll_stats_track_type;
- int ll_rw_stats_on;
+ struct lprocfs_stats *ll_ra_stats;
+
+ struct ll_ra_info ll_ra_info;
+ unsigned int ll_namelen;
+ const struct file_operations *ll_fop;
+
+ struct lu_site *ll_site;
+ struct cl_device *ll_cl;
+ /* Statistics */
+ struct ll_rw_extents_info ll_rw_extents_info;
+ int ll_extent_process_count;
+ struct ll_rw_process_info ll_rw_process_info[LL_PROCESS_HIST_MAX];
+ unsigned int ll_offset_process_count;
+ struct ll_rw_process_info ll_rw_offset_info[LL_OFFSET_HIST_MAX];
+ unsigned int ll_rw_offset_entry_count;
+ int ll_stats_track_id;
+ enum stats_track_type ll_stats_track_type;
+ int ll_rw_stats_on;
/* metadata stat-ahead */
unsigned int ll_sa_running_max;/* max concurrent
extern const struct address_space_operations ll_aops;
/* llite/file.c */
-extern struct file_operations ll_file_operations;
-extern struct file_operations ll_file_operations_flock;
-extern struct file_operations ll_file_operations_noflock;
-extern struct inode_operations ll_file_inode_operations;
+extern const struct file_operations ll_file_operations;
+extern const struct file_operations ll_file_operations_flock;
+extern const struct file_operations ll_file_operations_noflock;
+extern const struct inode_operations ll_file_inode_operations;
extern int ll_have_md_lock(struct inode *inode, __u64 *bits,
enum ldlm_mode l_req_mode);
extern enum ldlm_mode ll_take_md_lock(struct inode *inode, __u64 bits,
struct lookup_intent *it, struct dentry *de);
/* llite/llite_lib.c */
-extern struct super_operations lustre_super_operations;
+extern const struct super_operations lustre_super_operations;
void ll_lli_init(struct ll_inode_info *lli);
int ll_fill_super(struct super_block *sb);
}
/* llite/llite_nfs.c */
-extern struct export_operations lustre_export_operations;
+extern const struct export_operations lustre_export_operations;
__u32 get_uuid2int(const char *name, int len);
struct inode *search_inode_for_lustre(struct super_block *sb,
const struct lu_fid *fid);
int ll_dir_get_parent_fid(struct inode *dir, struct lu_fid *parent_fid);
/* llite/symlink.c */
-extern struct inode_operations ll_fast_symlink_inode_operations;
+extern const struct inode_operations ll_fast_symlink_inode_operations;
/**
* IO arguments for various VFS I/O interfaces.
RETURN(dentry);
}
-struct export_operations lustre_export_operations = {
+const struct export_operations lustre_export_operations = {
.get_parent = ll_get_parent,
.encode_fh = ll_encode_fh,
.get_name = ll_get_name,
}
/* exported operations */
-struct super_operations lustre_super_operations =
+const struct super_operations lustre_super_operations =
{
.alloc_inode = ll_alloc_inode,
.destroy_inode = ll_destroy_inode,
# endif /* HAVE_IOP_GET_LINK */
#endif /* HAVE_SYMLINK_OPS_USE_NAMEIDATA */
-struct inode_operations ll_fast_symlink_inode_operations = {
+const struct inode_operations ll_fast_symlink_inode_operations = {
#ifdef HAVE_IOP_GENERIC_READLINK
.readlink = generic_readlink,
#endif
return rc;
}
-static struct file_operations pool_proc_operations = {
+const static struct file_operations pool_proc_operations = {
.open = pool_proc_open,
.read = seq_read,
.llseek = seq_lseek,
return rc;
}
-static struct file_operations pool_proc_operations = {
- .open = pool_proc_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = seq_release,
+const static struct file_operations pool_proc_operations = {
+ .open = pool_proc_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
};
#endif /* CONFIG_PROC_FS */
}
/* declare character device */
-static struct file_operations obd_psdev_fops = {
+static const struct file_operations obd_psdev_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = obd_class_ioctl, /* unlocked_ioctl */
};
return seq_release(inode, file);
}
-static struct file_operations lu_ref_dump_fops = {
- .owner = THIS_MODULE,
- .open = lu_ref_seq_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = lu_ref_seq_release
+static const struct file_operations lu_ref_dump_fops = {
+ .owner = THIS_MODULE,
+ .open = lu_ref_seq_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = lu_ref_seq_release
};
#endif /* CONFIG_PROC_FS */
/** The operations we support directly on the superblock:
* mount, umount, and df.
*/
-static struct super_operations server_ops = {
+static const struct super_operations server_ops = {
.put_super = server_put_super,
.umount_begin = server_umount_begin, /* umount -f */
.statfs = server_statfs,
.fops = &ptlrpc_lprocfs_req_buffers_max_fops,
.data = svc },
{ NULL }
- };
- static struct file_operations req_history_fops = {
- .owner = THIS_MODULE,
- .open = ptlrpc_lprocfs_svc_req_history_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = lprocfs_seq_release,
- };
+ };
+ static const struct file_operations req_history_fops = {
+ .owner = THIS_MODULE,
+ .open = ptlrpc_lprocfs_svc_req_history_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = lprocfs_seq_release,
+ };
ptlrpc_ldebugfs_register(entry, svc->srv_name, "stats",
&svc->srv_debugfs_entry, &svc->srv_stats);
return seq_release(inode, file);
}
-struct file_operations lprocfs_quota_seq_fops = {
+const struct file_operations lprocfs_quota_seq_fops = {
.owner = THIS_MODULE,
.open = lprocfs_quota_seq_open,
.read = seq_read,
void qmt_glb_fini(void);
/* lproc_quota.c */
-extern struct file_operations lprocfs_quota_seq_fops;
+extern const struct file_operations lprocfs_quota_seq_fops;
/* qsd_lib.c */
int qsd_glb_init(void);