diff --git a/fs/incfs/format.c b/fs/incfs/format.c index 247e1b4ec563..db71f527cf36 100644 --- a/fs/incfs/format.c +++ b/fs/incfs/format.c @@ -178,7 +178,7 @@ static int append_md_to_backing_file(struct backing_file_context *bfc, record_size = le16_to_cpu(record->h_record_size); file_pos = incfs_get_end_offset(bfc->bc_file); - record->h_prev_md_offset = bfc->bc_last_md_record_offset; + record->h_prev_md_offset = cpu_to_le64(bfc->bc_last_md_record_offset); record->h_next_md_offset = 0; record->h_record_crc = cpu_to_le32(calc_md_crc(record)); @@ -281,7 +281,7 @@ int incfs_write_file_attr_to_backing_file(struct backing_file_context *bfc, file_attr.fa_header.h_next_md_offset = cpu_to_le64(0); file_attr.fa_size = cpu_to_le16((u16)value.len); file_attr.fa_offset = cpu_to_le64(value_offset); - file_attr.fa_crc = cpu_to_le64(crc); + file_attr.fa_crc = cpu_to_le32(crc); result = write_to_bf(bfc, value.data, value.len, value_offset, true); if (result) diff --git a/fs/incfs/main.c b/fs/incfs/main.c index d9eec7496846..e65d0d895128 100644 --- a/fs/incfs/main.c +++ b/fs/incfs/main.c @@ -12,7 +12,7 @@ #define INCFS_NODE_FEATURES "features" -struct file_system_type incfs_fs_type = { +static struct file_system_type incfs_fs_type = { .owner = THIS_MODULE, .name = INCFS_NAME, .mount = incfs_mount_fs, diff --git a/fs/incfs/vfs.c b/fs/incfs/vfs.c index c779c60c5c09..f3f7ede65fd7 100644 --- a/fs/incfs/vfs.c +++ b/fs/incfs/vfs.c @@ -18,6 +18,7 @@ #include +#include "vfs.h" #include "data_mgmt.h" #include "format.h" #include "integrity.h" @@ -173,7 +174,7 @@ static const struct xattr_handler incfs_xattr_handler = { .get = incfs_handler_getxattr, }; -const struct xattr_handler *incfs_xattr_ops[] = { +static const struct xattr_handler *incfs_xattr_ops[] = { &incfs_xattr_handler, NULL, }; @@ -933,11 +934,11 @@ static int init_new_file(struct mount_info *mi, struct dentry *dentry, struct path path = {}; struct file *new_file; int error = 0; - struct backing_file_context *bfc = 0; + struct backing_file_context *bfc = NULL; u32 block_count; - struct mem_range mem_range = {0}; - struct signature_info *si = 0; - struct mtree *hash_tree = 0; + struct mem_range mem_range = {NULL}; + struct signature_info *si = NULL; + struct mtree *hash_tree = NULL; if (!mi || !dentry || !uuid) return -EFAULT;