commit d207f6e80540df8500f9905291f8bffd1e46f5c3
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date:   Tue May 29 12:27:25 2007 -0400

    dget odf root dentry on odf_read_super

diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index 4a0e110..0ca46f6 100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -188,7 +188,7 @@ int odf_read_super(struct super_block *sb, char *data)
        osi->cleanup = sioa;
        osi->mnt = nd.mnt;
        mntget(osi->mnt);
-       dget(osi->mnt->mnt_sb->s_root);
+       dget(nd.dentry);
        path_release(&nd);
        goto out;
 
@@ -220,6 +220,11 @@ out:
  */
 void odf_put_super(struct odf_sb_info *osi)
 {
+       struct dentry *odf_root = NULL;
+
+       if (osi->sb)
+               odf_root = osi->sb->d_parent;
+
        dput(osi->ns);
        osi->ns = NULL;
        dput(osi->rc);
@@ -235,10 +240,8 @@ void odf_put_super(struct odf_sb_info *osi)
        kfree(osi->branch_uuids);
        osi->branch_uuids = NULL;
 
-       if (osi->mnt) {
-               dput(osi->mnt->mnt_sb->s_root);
-               mntput(osi->mnt);
-       }
+       dput(odf_root);
+       mntput(osi->mnt);
        if (osi->cleanup)
                complete_sioa(osi->cleanup);
        kfree(osi->cleanup);
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to