Skip to content

Commit afb9bd7

Browse files
committed
Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd
Pull trivial exofs changes from Boaz Harrosh: "Just nothingness really. The big exofs changes are reserved for the next merge window." * 'for-linus' of git://git.open-osd.org/linux-open-osd: exofs: Cap on the memcpy() size exofs: (trivial) Fix typo in super.c exofs: fix endian conversion in exofs_sync_fs()
2 parents 58df9b3 + 72749a2 commit afb9bd7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

fs/exofs/super.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ static int exofs_sync_fs(struct super_block *sb, int wait)
389389
ios->length = offsetof(struct exofs_fscb, s_dev_table_oid);
390390
memset(fscb, 0, ios->length);
391391
fscb->s_nextid = cpu_to_le64(sbi->s_nextid);
392-
fscb->s_numfiles = cpu_to_le32(sbi->s_numfiles);
392+
fscb->s_numfiles = cpu_to_le64(sbi->s_numfiles);
393393
fscb->s_magic = cpu_to_le16(sb->s_magic);
394394
fscb->s_newfs = 0;
395395
fscb->s_version = EXOFS_FSCB_VER;
@@ -529,7 +529,8 @@ static int exofs_devs_2_odi(struct exofs_dt_device_info *dt_dev,
529529
struct osd_dev_info *odi)
530530
{
531531
odi->systemid_len = le32_to_cpu(dt_dev->systemid_len);
532-
memcpy(odi->systemid, dt_dev->systemid, odi->systemid_len);
532+
if (likely(odi->systemid_len))
533+
memcpy(odi->systemid, dt_dev->systemid, OSD_SYSTEMID_LEN);
533534

534535
odi->osdname_len = le32_to_cpu(dt_dev->osdname_len);
535536
odi->osdname = dt_dev->osdname;
@@ -565,7 +566,7 @@ int __alloc_dev_table(struct exofs_sb_info *sbi, unsigned numdevs,
565566

566567
aoded = kzalloc(sizeof(*aoded), GFP_KERNEL);
567568
if (unlikely(!aoded)) {
568-
EXOFS_ERR("ERROR: faild allocating Device array[%d]\n",
569+
EXOFS_ERR("ERROR: failed allocating Device array[%d]\n",
569570
numdevs);
570571
return -ENOMEM;
571572
}

0 commit comments

Comments
 (0)