commit 2ccee576e1cc9295c8a2b2f2cba9dc61b85adc18
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date:   Fri Apr 27 16:08:10 2007 -0400

    odf bug: dget odf/sb when reading/writting sb file

diff --git a/fs/unionfs/file.c b/fs/unionfs/file.c
index 6959bea..c76c537 100644
--- a/fs/unionfs/file.c
+++ b/fs/unionfs/file.c
@@ -50,7 +50,7 @@ static ssize_t unionfs_aio_read(struct kiocb *iocb, const 
struct iovec *iov,
        int err;
 
        err = generic_file_aio_read(iocb, iov, nr_segs, pos);
-       
+
        if (err == -EIOCBQUEUED)
                err = wait_on_sync_kiocb(iocb);
 
diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index 847cd0b..3e5938c 100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -1926,7 +1926,9 @@ int odf_write_sb_data(struct odf_sb_info* osi, struct 
unionfs_data *data, struct
                err = -EINVAL;
                goto out;
        }
-       else if (d_content->d_inode) {
+
+       dget(d_content);
+       if (d_content->d_inode) {
                /* truncate */
                attr.ia_size = 0;
                attr.ia_valid = ATTR_SIZE | ATTR_FORCE;
@@ -2066,7 +2068,9 @@ char *odf_read_sb_data(struct odf_sb_info *odf_sb, int 
**bid)
                err = -EINVAL;
                goto out_err;
        }
-       else if (!d_content->d_inode) {
+
+       dget(d_content);
+       if (!d_content->d_inode) {
                dput(d_content);
                err = -EINVAL;
                goto out_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