aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-28 23:04:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-28 23:04:27 -0400
commitafb9bd704c7116076879352a2cc2c43aa12c1e14 (patch)
treeb622fba5044ef3111050ca9dacce207ba49fea39 /fs
parent58df9b387c5f240566ac15b7fa5136f5a35bb19a (diff)
parent72749a270b6d254b4a018e290b853c27edb2fa62 (diff)
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()
Diffstat (limited to 'fs')
-rw-r--r--fs/exofs/super.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/exofs/super.c b/fs/exofs/super.c
index 7f2b590a36b7..735ca06430ac 100644
--- a/fs/exofs/super.c
+++ b/fs/exofs/super.c
@@ -389,7 +389,7 @@ static int exofs_sync_fs(struct super_block *sb, int wait)
389 ios->length = offsetof(struct exofs_fscb, s_dev_table_oid); 389 ios->length = offsetof(struct exofs_fscb, s_dev_table_oid);
390 memset(fscb, 0, ios->length); 390 memset(fscb, 0, ios->length);
391 fscb->s_nextid = cpu_to_le64(sbi->s_nextid); 391 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);
393 fscb->s_magic = cpu_to_le16(sb->s_magic); 393 fscb->s_magic = cpu_to_le16(sb->s_magic);
394 fscb->s_newfs = 0; 394 fscb->s_newfs = 0;
395 fscb->s_version = EXOFS_FSCB_VER; 395 fscb->s_version = EXOFS_FSCB_VER;
@@ -529,7 +529,8 @@ static int exofs_devs_2_odi(struct exofs_dt_device_info *dt_dev,
529 struct osd_dev_info *odi) 529 struct osd_dev_info *odi)
530{ 530{
531 odi->systemid_len = le32_to_cpu(dt_dev->systemid_len); 531 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);
533 534
534 odi->osdname_len = le32_to_cpu(dt_dev->osdname_len); 535 odi->osdname_len = le32_to_cpu(dt_dev->osdname_len);
535 odi->osdname = dt_dev->osdname; 536 odi->osdname = dt_dev->osdname;
@@ -565,7 +566,7 @@ int __alloc_dev_table(struct exofs_sb_info *sbi, unsigned numdevs,
565 566
566 aoded = kzalloc(sizeof(*aoded), GFP_KERNEL); 567 aoded = kzalloc(sizeof(*aoded), GFP_KERNEL);
567 if (unlikely(!aoded)) { 568 if (unlikely(!aoded)) {
568 EXOFS_ERR("ERROR: faild allocating Device array[%d]\n", 569 EXOFS_ERR("ERROR: failed allocating Device array[%d]\n",
569 numdevs); 570 numdevs);
570 return -ENOMEM; 571 return -ENOMEM;
571 } 572 }