commit 4a897fd15d38858e1733de43db415be79dc4de8d
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date:   Mon Mar 26 17:24:01 2007 -0400

    a couple of small bug fixes

diff --git a/fs/unionfs/main.c b/fs/unionfs/main.c
index c8749af..5ec7c82 100644
--- a/fs/unionfs/main.c
+++ b/fs/unionfs/main.c
@@ -582,6 +582,7 @@ static int unionfs_read_super(struct super_block *sb, void 
*raw_data,
                if (IS_ERR(odf_options)) {
                        printk(KERN_WARNING "unionfs_read_super: could not load 
options from odf\n");
                        err = PTR_ERR(odf_options);
+                       odf_options = NULL;
                        goto out_free;
                }
                if (strstr(raw_data,"dirs="))
diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index 727e27e..0c92939 100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -1168,7 +1168,7 @@ char *odf_read_sb_data(struct odf_sb_info *odf_sb, int 
**bid)
                err = -EINVAL;
                goto out_err;
        }
-       
+
        mntget(odf_sb->mnt);
        file = dentry_open(d_content, odf_sb->mnt, O_RDONLY);
        if (IS_ERR(file)) {
@@ -1240,7 +1240,7 @@ char *odf_read_sb_data(struct odf_sb_info *odf_sb, int 
**bid)
 
                /* path, read it to the options string */
                err = file->f_op->read(file, ptr, len, &file->f_pos);
-               if (err != sizeof(len)) {
+               if (err != len) {
                        err = -EIO;
                        goto out_close;
                }
@@ -1254,7 +1254,7 @@ char *odf_read_sb_data(struct odf_sb_info *odf_sb, int 
**bid)
                perms = le32_to_cpu(le32);
 
                /* branch uuid*/
-               file->f_op->read(file, (char*)uuid, UUID_LEN, &file->f_pos);
+               err = file->f_op->read(file, (char*)uuid, UUID_LEN, 
&file->f_pos);
                if (err != UUID_LEN) {
                        err = -EIO;
                        goto out_close;
diff --git a/fs/unionfs/unlink.c b/fs/unionfs/unlink.c
index a6861da..1e1f8c3 100644
--- a/fs/unionfs/unlink.c
+++ b/fs/unionfs/unlink.c
@@ -25,6 +25,9 @@ static int unionfs_do_unlink(struct inode *dir, struct dentry 
*dentry)
        int bstart, bend, bindex;
        int err = 0;
        struct iattr attr;
+       int opaque;
+
+       opaque = odf_get_opaque(dentry->d_sb,dentry);
 
        if ((err = unionfs_partial_lookup(dentry)))
                goto out;
@@ -78,7 +81,7 @@ out:
                dentry->d_inode->i_nlink--;
 
        /* We don't want to leave negative leftover dentries for revalidate. */
-       if (!err && (odf_get_opaque(dentry->d_sb,dentry) != -1))
+       if (!err && opaque != -1)
                update_bstart(dentry);
 
        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