reiser4: implement ->remount_fs() super operation
PATCH 1/1 reiser4: implement ->remount_fs() super operation
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 <[email protected]>
--- fs/reiser4/flush.c | 2 ++ fs/reiser4/super_ops.c | 7 +++++++ 2 files changed, 9 insertions(+)
fs/reiser4/super_ops.c +7 -0
@@ -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 };
fs/reiser4/flush.c +2 -0
@@ -1037,6 +1037,8 @@ flush_current_atom(int flags, long nr_toassert_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);