]> git.neil.brown.name Git - LaFS.git/commitdiff
put_super: release orphan and segsum files.
authorNeilBrown <neilb@suse.de>
Sun, 2 Aug 2009 09:29:48 +0000 (19:29 +1000)
committerNeilBrown <neilb@suse.de>
Sun, 2 Aug 2009 09:29:48 +0000 (19:29 +1000)
These files need to be released at unmount...

super.c

diff --git a/super.c b/super.c
index 67d8d4a75f288d41d23e85c633219c12885fff09..39502568f0081581fb4a719a9581401f7fb8917a 100644 (file)
--- a/super.c
+++ b/super.c
@@ -675,6 +675,7 @@ lafs_put_super(struct super_block *sb)
        struct lafs_inode *li;
 
        if (sb == fs->prime_sb) {
+               int d;
                /* This is the main sb, not a snapshot or
                 * subordinate fs
                 */
@@ -685,6 +686,14 @@ lafs_put_super(struct super_block *sb)
                lafs_checkpoint_unlock_wait(fs);
                lafs_empty_segment_table(fs);
                lafs_seg_put_all(fs);
+
+               iput(fs->orphans);
+               fs->orphans = NULL;
+               for (d=0; d < fs->devices; d++)
+                       if (fs->devs[d].segsum) {
+                               iput(fs->devs[d].segsum);
+                               fs->devs[d].segsum = NULL;
+                       }
        }
 
        /* need to break a circular reference... */