aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/pohmelfs
diff options
context:
space:
mode:
authorEvgeniy Polyakov <zbr@ioremap.net>2009-03-27 15:04:24 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-17 11:06:30 -0700
commitcee9bb2ebdc1697f9be7ee5bdd6867daaa712179 (patch)
tree370cc93935bf1ed377d2e696d3c297e399d9246d /drivers/staging/pohmelfs
parente504342448375ffd73dec2b540a5aaf5da6f8439 (diff)
Staging: Pohmelfs: Sync fs before killing it, since dentry cache is shrunk before writeback is invoked via generic_shutdown_super()
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/pohmelfs')
-rw-r--r--drivers/staging/pohmelfs/inode.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c
index 3fef09fd712..af99f6620b7 100644
--- a/drivers/staging/pohmelfs/inode.c
+++ b/drivers/staging/pohmelfs/inode.c
@@ -1908,11 +1908,29 @@ static int pohmelfs_get_sb(struct file_system_type *fs_type,
mnt);
}
+/*
+ * We need this to sync all inodes earlier, since when writeback
+ * is invoked from the umount/mntput path dcache is already shrunk,
+ * see generic_shutdown_super(), and no inodes can access the path.
+ */
+static void pohmelfs_kill_super(struct super_block *sb)
+{
+ struct writeback_control wbc = {
+ .sync_mode = WB_SYNC_ALL,
+ .range_start = 0,
+ .range_end = LLONG_MAX,
+ .nr_to_write = LONG_MAX,
+ };
+ generic_sync_sb_inodes(sb, &wbc);
+
+ kill_anon_super(sb);
+}
+
static struct file_system_type pohmel_fs_type = {
.owner = THIS_MODULE,
.name = "pohmel",
.get_sb = pohmelfs_get_sb,
- .kill_sb = kill_anon_super,
+ .kill_sb = pohmelfs_kill_super,
};
/*