--- /dev/null
+--- linux.orig/fs/ext3/super.c 2006-08-25 12:39:48.000000000 +0400
++++ linux/fs/ext3/super.c 2006-09-27 02:37:46.000000000 +0400
+@@ -1139,8 +1139,8 @@
+ * e2fsck was run on this filesystem, and it must have already done the orphan
+ * inode cleanup for us, so we can safely abort without any further action.
+ */
+-static void ext3_orphan_cleanup (struct super_block * sb,
+- struct ext3_super_block * es)
++void ext3_orphan_cleanup (struct super_block * sb,
++ struct ext3_super_block * es)
+ {
+ unsigned int s_flags = sb->s_flags;
+ int nr_orphans = 0, nr_truncates = 0;
+@@ -1227,7 +1227,9 @@
+ }
+ #endif
+ sb->s_flags = s_flags; /* Restore MS_RDONLY status */
++ EXT3_SB(sb)->s_mount_state &= ~EXT3_ORPHAN_FS;
+ }
++EXPORT_SYMBOL(ext3_orphan_cleanup);
+
+ #define log2(n) ffz(~(n))
+
+@@ -1641,9 +1643,8 @@
+ * superblock lock.
+ */
+ EXT3_SB(sb)->s_mount_state |= EXT3_ORPHAN_FS;
+- ext3_orphan_cleanup(sb, es);
+- EXT3_SB(sb)->s_mount_state &= ~EXT3_ORPHAN_FS;
+- if (needs_recovery)
++
++ if (needs_recovery)
+ printk (KERN_INFO "EXT3-fs: recovery complete.\n");
+ ext3_mark_recovery_complete(sb, es);
+ printk (KERN_INFO "EXT3-fs: mounted filesystem with %s data mode.\n",
* ("*OBJ-TEMP*"), but name in that directory is _not_ counted in
* inode ->i_nlink.
*/
-
+
osd_index_fini(obj);
if (inode != NULL) {
int result;
li->i_flags = (li->i_flags & ~LDISKFS_FL_USER_MODIFIABLE) |
(attr->la_flags & LDISKFS_FL_USER_MODIFIABLE);
}
- mark_inode_dirty(inode);
+ mark_inode_dirty(inode);
return rc;
}
RETURN(err);
}
+extern void ldiskfs_orphan_cleanup (struct super_block * sb,
+ struct ldiskfs_super_block * es);
static int osd_recovery_complete(const struct lu_context *ctxt,
struct lu_device *d)
{
+ struct osd_device *o = osd_dev(d);
ENTRY;
/* TODO: orphans handling */
+ ldiskfs_orphan_cleanup(osd_sb(o), LDISKFS_SB(osd_sb(o))->s_es);
RETURN(0);
}