Hello everyone,
This patch prevents panic during reboot/shutdown caused by VFS changes
in 3.15
Thanks,
Edward.
Add ->remount_fs() super option, which performs sync_filesystem()
needed when when transitioning from read-write to read-only, see
http://marc.info/?l=samba-technical&m=139550798721412&w=2 for details.
Panic when flushing read-only file system.
Signed-off-by: Edward Shishkin <edward.shishkin@xxxxxxxxx>
---
fs/reiser4/flush.c | 2 ++
fs/reiser4/super_ops.c | 7 +++++++
2 files changed, 9 insertions(+)
--- a/fs/reiser4/super_ops.c
+++ b/fs/reiser4/super_ops.c
@@ -445,6 +445,12 @@ static int reiser4_sync_fs(struct super_
return 0;
}
+static int reiser4_remount(struct super_block *s, int *mount_flags, char *arg)
+{
+ sync_filesystem(s);
+ return 0;
+}
+
/**
* reiser4_show_options - show_options of super operations
* @m: file where to write information
@@ -479,6 +485,7 @@ struct super_operations reiser4_super_op
.put_super = reiser4_put_super,
.sync_fs = reiser4_sync_fs,
.statfs = reiser4_statfs,
+ .remount_fs = reiser4_remount,
.writeback_inodes = reiser4_writeback_inodes,
.show_options = reiser4_show_options
};
--- a/fs/reiser4/flush.c
+++ b/fs/reiser4/flush.c
@@ -1037,6 +1037,8 @@ flush_current_atom(int flags, long nr_to
assert_spin_locked(&((*atom)->alock));
assert("zam-892", get_current_context()->trans->atom == *atom);
+ BUG_ON(rofs_super(get_current_context()->super));
+
nr_to_write = LONG_MAX;
while (1) {
ret = reiser4_fq_by_atom(*atom, &fq);