Merge tag 'for-linus-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs
Pull JFFS2, UBI and UBIFS updates from Richard Weinberger: "JFFS2: - Use splice_write() - Fix for a slab-out-of-bounds bug UBI: - Fix for clang related warnings - Code cleanup UBIFS: - Fix for inode rebirth at replay - Set s_uuid - Use zstd for default filesystem" * tag 'for-linus-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubi: Remove unnecessary struct declaration jffs2: Hook up splice_write callback jffs2: avoid Wempty-body warnings jffs2: Fix kasan slab-out-of-bounds problem ubi: Fix fall-through warnings for Clang ubifs: Report max LEB count at mount time ubifs: Set s_uuid in super block to support ima/evm uuid options ubifs: Default to zstd compression ubifs: Only check replay with inode type to judge if inode linked
This commit is contained in:
@@ -1350,6 +1350,7 @@ static int bytes_str_to_int(const char *str)
|
||||
fallthrough;
|
||||
case 'K':
|
||||
result *= 1024;
|
||||
break;
|
||||
case '\0':
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -388,8 +388,6 @@ struct ubi_volume_desc {
|
||||
int mode;
|
||||
};
|
||||
|
||||
struct ubi_wl_entry;
|
||||
|
||||
/**
|
||||
* struct ubi_debug_info - debugging information for an UBI device.
|
||||
*
|
||||
|
||||
@@ -57,6 +57,7 @@ const struct file_operations jffs2_file_operations =
|
||||
.mmap = generic_file_readonly_mmap,
|
||||
.fsync = jffs2_fsync,
|
||||
.splice_read = generic_file_splice_read,
|
||||
.splice_write = iter_file_splice_write,
|
||||
};
|
||||
|
||||
/* jffs2_file_inode_operations */
|
||||
|
||||
@@ -1079,7 +1079,7 @@ static int jffs2_scan_dirent_node(struct jffs2_sb_info *c, struct jffs2_eraseblo
|
||||
memcpy(&fd->name, rd->name, checkedlen);
|
||||
fd->name[checkedlen] = 0;
|
||||
|
||||
crc = crc32(0, fd->name, rd->nsize);
|
||||
crc = crc32(0, fd->name, checkedlen);
|
||||
if (crc != je32_to_cpu(rd->name_crc)) {
|
||||
pr_notice("%s(): Name CRC failed on node at 0x%08x: Read 0x%08x, calculated 0x%08x\n",
|
||||
__func__, ofs, je32_to_cpu(rd->name_crc), crc);
|
||||
|
||||
@@ -194,18 +194,18 @@ int jffs2_sum_scan_sumnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb
|
||||
|
||||
#define jffs2_sum_active() (0)
|
||||
#define jffs2_sum_init(a) (0)
|
||||
#define jffs2_sum_exit(a)
|
||||
#define jffs2_sum_exit(a) do { } while (0)
|
||||
#define jffs2_sum_disable_collecting(a)
|
||||
#define jffs2_sum_is_disabled(a) (0)
|
||||
#define jffs2_sum_reset_collected(a)
|
||||
#define jffs2_sum_reset_collected(a) do { } while (0)
|
||||
#define jffs2_sum_add_kvec(a,b,c,d) (0)
|
||||
#define jffs2_sum_move_collected(a,b)
|
||||
#define jffs2_sum_move_collected(a,b) do { } while (0)
|
||||
#define jffs2_sum_write_sumnode(a) (0)
|
||||
#define jffs2_sum_add_padding_mem(a,b)
|
||||
#define jffs2_sum_add_inode_mem(a,b,c)
|
||||
#define jffs2_sum_add_dirent_mem(a,b,c)
|
||||
#define jffs2_sum_add_xattr_mem(a,b,c)
|
||||
#define jffs2_sum_add_xref_mem(a,b,c)
|
||||
#define jffs2_sum_add_padding_mem(a,b) do { } while (0)
|
||||
#define jffs2_sum_add_inode_mem(a,b,c) do { } while (0)
|
||||
#define jffs2_sum_add_dirent_mem(a,b,c) do { } while (0)
|
||||
#define jffs2_sum_add_xattr_mem(a,b,c) do { } while (0)
|
||||
#define jffs2_sum_add_xref_mem(a,b,c) do { } while (0)
|
||||
#define jffs2_sum_scan_sumnode(a,b,c,d,e) (0)
|
||||
|
||||
#endif /* CONFIG_JFFS2_SUMMARY */
|
||||
|
||||
@@ -223,7 +223,8 @@ static bool inode_still_linked(struct ubifs_info *c, struct replay_entry *rino)
|
||||
*/
|
||||
list_for_each_entry_reverse(r, &c->replay_list, list) {
|
||||
ubifs_assert(c, r->sqnum >= rino->sqnum);
|
||||
if (key_inum(c, &r->key) == key_inum(c, &rino->key))
|
||||
if (key_inum(c, &r->key) == key_inum(c, &rino->key) &&
|
||||
key_type(c, &r->key) == UBIFS_INO_KEY)
|
||||
return r->deletion == 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -53,6 +53,9 @@
|
||||
|
||||
static int get_default_compressor(struct ubifs_info *c)
|
||||
{
|
||||
if (ubifs_compr_present(c, UBIFS_COMPR_ZSTD))
|
||||
return UBIFS_COMPR_ZSTD;
|
||||
|
||||
if (ubifs_compr_present(c, UBIFS_COMPR_LZO))
|
||||
return UBIFS_COMPR_LZO;
|
||||
|
||||
|
||||
@@ -1552,8 +1552,8 @@ static int mount_ubifs(struct ubifs_info *c)
|
||||
ubifs_msg(c, "LEB size: %d bytes (%d KiB), min./max. I/O unit sizes: %d bytes/%d bytes",
|
||||
c->leb_size, c->leb_size >> 10, c->min_io_size,
|
||||
c->max_write_size);
|
||||
ubifs_msg(c, "FS size: %lld bytes (%lld MiB, %d LEBs), journal size %lld bytes (%lld MiB, %d LEBs)",
|
||||
x, x >> 20, c->main_lebs,
|
||||
ubifs_msg(c, "FS size: %lld bytes (%lld MiB, %d LEBs), max %d LEBs, journal size %lld bytes (%lld MiB, %d LEBs)",
|
||||
x, x >> 20, c->main_lebs, c->max_leb_cnt,
|
||||
y, y >> 20, c->log_lebs + c->max_bud_cnt);
|
||||
ubifs_msg(c, "reserved for root: %llu bytes (%llu KiB)",
|
||||
c->report_rp_size, c->report_rp_size >> 10);
|
||||
@@ -2232,6 +2232,8 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
|
||||
goto out_umount;
|
||||
}
|
||||
|
||||
import_uuid(&sb->s_uuid, c->uuid);
|
||||
|
||||
mutex_unlock(&c->umount_mutex);
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user