reiser4: capture superblock when syncing fs
PATCH 4/4 reiser4: capture superblock when syncing fs
. Capture super block when syncing fs to synchronize
the superblock with the other stuff;
. Make gcc happy.
Signed-off-by Edward Shishkin <[email protected]>
--- fs/reiser4/carry_ops.c | 4 ++-- fs/reiser4/super_ops.c | 13 ++++++++++++- fs/reiser4/tree.h | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-)
fs/reiser4/super_ops.c +12 -1
@@ -397,6 +397,7 @@ static long reiser4_writeback_inodes(str/* ->sync_fs() of super operations */ static int reiser4_sync_fs (struct super_block *super,int wait) { +int ret;reiser4_context *ctx;struct bdi_writeback *wb;struct wb_writeback_work work = {
@@ -417,13 +418,23 @@ static int reiser4_sync_fs(struct super_warning ("edward-1567" ,"failed to init context" );return PTR_ERR (ctx); } +/* +* Capture znode associated with super block +*/ + ret =reiser4_capture_super_block (super); +if (ret !=0 ) +warning ("vs-1701" , +"reiser4_capture_super_block failed in write_super: %d" , + ret); + wb = &reiser4_get_super_fake (super)->i_mapping->backing_dev_info->wb;spin_lock (&wb->list_lock);generic_writeback_sb_inodes (super, wb, &wbc, &work, true);spin_unlock (&wb->list_lock); wbc.nr_to_write =LONG_MAX ;/* -* flush goes here +* (flush goes here) +* commit all transactions */ reiser4_writeout (super, &wbc);
fs/reiser4/carry_ops.c +2 -2
@@ -1339,7 +1339,7 @@ static int carry_delete(carry_op * op /* node_num_items(parent) == 1) result =reiser4_kill_tree_root (coord.node); -return result <0 ? :0 ; +return result <0 ? result :0 ; }/* implements COP_CUT opration
@@ -1369,7 +1369,7 @@ static int carry_cut(carry_op * op /* op result = nplug->cut_and_kill (op->u.cut_or_kill.u.kill, &info); doing->restartable =0 ; -return result <0 ? :0 ; +return result <0 ? result :0 ; }/* helper function for carry_paste(): returns true if @op can be continued as
fs/reiser4/tree.h +1 -1
@@ -405,7 +405,7 @@ typedef struct cbk_handle {/* put here error message to be printed by caller */ const char *error;/* result passed back to caller */ -lookup_result result; +int result;/* lock handles for active and parent */ lock_handle *parent_lh;lock_handle *active_lh;