commit bb880f4497335558ae7135465ff2662d44b77cdc
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date:   Sun Mar 25 17:29:11 2007 -0400

    update odf sb data on remounts

diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index b266b4e..ebbc34f 100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -1891,7 +1891,7 @@ int odf_write_sb_data(struct odf_sb_info* osi, struct 
unionfs_data *data, struct
        int err = 0;
        __le32 le32;
        unsigned char *uuid = NULL;
-       u32 *bid = NULL;
+       u32 *buuid = NULL;
        char *branch_entry = kmalloc(ODF_BRANCH_PATH, GFP_KERNEL);
        char *branch_path = kmalloc(ODF_BRANCH_PATH, GFP_KERNEL);
        mm_segment_t oldfs;
@@ -1906,11 +1906,10 @@ int odf_write_sb_data(struct odf_sb_info* osi, struct 
unionfs_data *data, struct
        odf_mnt = osi->mnt;
 
        /* check the number of branches */
-       count = hidden_root->bend - hidden_root->bstart + 1;
-       if (count >= (1 << ODF_OPQ_BITS)) {
+       if (branches >= (1 << ODF_OPQ_BITS)) {
                printk(KERN_WARNING "unionfs: too many branches (%d), "
                        "odf can only support %d branches\n",
-                       count, (1 << ODF_OPQ_BITS) - 1);
+                       branches, (1 << ODF_OPQ_BITS) - 1);
                err = -EINVAL;
                goto out;
        }
@@ -1966,9 +1965,9 @@ int odf_write_sb_data(struct odf_sb_info* osi, struct 
unionfs_data *data, struct
                goto out_close;
        }
 
-       bid = kmalloc(count * sizeof(u32), GFP_KERNEL);
-       uuid = kmalloc(count * UUID_LEN, GFP_KERNEL);
-       if (!bid || !uuid) {
+       buuid = kmalloc(branches * sizeof(u32), GFP_KERNEL);
+       uuid = kmalloc(branches * UUID_LEN, GFP_KERNEL);
+       if (!buuid || !uuid) {
                err = -ENOMEM;
                goto out_close;
        }
@@ -2031,7 +2030,7 @@ out_close:
        filp_close(file,NULL);
 out:
        kfree(uuid);
-       kfree(bid);
+       kfree(buuid);
        kfree(branch_path);
        kfree(branch_entry);
        return err;
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to