]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 29 Mar 2012 03:04:27 +0000 (20:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 29 Mar 2012 03:04:27 +0000 (20:04 -0700)
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()

1  2 
fs/exofs/super.c

diff --combined fs/exofs/super.c
index 7f2b590a36b761182c9d4fa56b16f11ab7171ac9,6c5397ad7a2aa4e2e3f45f46e31c6f6e7da8cb1f..735ca06430ac9df3aadb6d470f4a16a3ea0e5f89
@@@ -389,7 -389,7 +389,7 @@@ static int exofs_sync_fs(struct super_b
        ios->length = offsetof(struct exofs_fscb, s_dev_table_oid);
        memset(fscb, 0, ios->length);
        fscb->s_nextid = cpu_to_le64(sbi->s_nextid);
-       fscb->s_numfiles = cpu_to_le32(sbi->s_numfiles);
+       fscb->s_numfiles = cpu_to_le64(sbi->s_numfiles);
        fscb->s_magic = cpu_to_le16(sb->s_magic);
        fscb->s_newfs = 0;
        fscb->s_version = EXOFS_FSCB_VER;
@@@ -529,7 -529,8 +529,8 @@@ static int exofs_devs_2_odi(struct exof
                             struct osd_dev_info *odi)
  {
        odi->systemid_len = le32_to_cpu(dt_dev->systemid_len);
-       memcpy(odi->systemid, dt_dev->systemid, odi->systemid_len);
+       if (likely(odi->systemid_len))
+               memcpy(odi->systemid, dt_dev->systemid, OSD_SYSTEMID_LEN);
  
        odi->osdname_len = le32_to_cpu(dt_dev->osdname_len);
        odi->osdname = dt_dev->osdname;
@@@ -565,7 -566,7 +566,7 @@@ int __alloc_dev_table(struct exofs_sb_i
  
        aoded = kzalloc(sizeof(*aoded), GFP_KERNEL);
        if (unlikely(!aoded)) {
-               EXOFS_ERR("ERROR: faild allocating Device array[%d]\n",
+               EXOFS_ERR("ERROR: failed allocating Device array[%d]\n",
                          numdevs);
                return -ENOMEM;
        }
@@@ -754,7 -755,6 +755,7 @@@ static int exofs_fill_super(struct supe
        sb->s_blocksize = EXOFS_BLKSIZE;
        sb->s_blocksize_bits = EXOFS_BLKSHIFT;
        sb->s_maxbytes = MAX_LFS_FILESIZE;
 +      sb->s_max_links = EXOFS_LINK_MAX;
        atomic_set(&sbi->s_curr_pending, 0);
        sb->s_bdev = NULL;
        sb->s_dev = 0;
                ret = PTR_ERR(root);
                goto free_sbi;
        }
 -      sb->s_root = d_alloc_root(root);
 +      sb->s_root = d_make_root(root);
        if (!sb->s_root) {
 -              iput(root);
                EXOFS_ERR("ERROR: get root inode failed\n");
                ret = -ENOMEM;
                goto free_sbi;