void reiserfs_write_super (struct super_block * s) { int dirty = 0 ; if (!(s->s_flags & MS_RDONLY)) { #if 0 /* journal victim */ rs = SB_DISK_SUPER_BLOCK (s); /* * if reiserfs was mounted with read-write permissions make file * system state not valid so that if we crash without doing a * clean umount we know that we must run file system * checker. umount will mark it valid if it does a clean umount */ if (le16_to_cpu (rs->s_state) == REISERFS_VALID_FS) { rs->s_state = cpu_to_le16 (REISERFS_ERROR_FS); /* mark_buffer_dirty (SB_BUFFER_WITH_SB (s), 1); */ journal_begin(&th, s, 1) ; journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s)) ; journal_end(&th, s, 1) ; } #endif dirty = flush_old_commits(s, 1) ; } s->s_dirt = dirty; }
// // a portion of this function, particularly the VFS interface portion, // was derived from minix or ext2's analog and evolved as the // prototype did. You should be able to tell which portion by looking // at the ext2 code and comparing. It's subfunctions contain no code // used as a template unless they are so labeled. // static void reiserfs_write_super (struct super_block * s) { int dirty = 0 ; lock_kernel() ; if (!(s->s_flags & MS_RDONLY)) { dirty = flush_old_commits(s, 1) ; } s->s_dirt = dirty; unlock_kernel() ; }