safe_mask |= 1 << REISERFS_QUOTA; 
static int reiserfs_remount (struct super_block * s, int * mount_flags, char * arg){  struct reiserfs_super_block * rs;  struct reiserfs_transaction_handle th ;  unsigned long blocks;  unsigned long mount_options = REISERFS_SB(s)->s_mount_opt;  unsigned long safe_mask = 0;  unsigned int commit_max_age = (unsigned int)-1;  struct reiserfs_journal *journal = SB_JOURNAL(s);  int err;#ifdef CONFIG_QUOTA  int i;#endif  rs = SB_DISK_SUPER_BLOCK (s);  if (!reiserfs_parse_options(s, arg, &mount_options, &blocks, NULL, &commit_max_age)) {#ifdef CONFIG_QUOTA    for (i = 0; i < MAXQUOTAS; i++)	if (REISERFS_SB(s)->s_qf_names[i]) {	    kfree(REISERFS_SB(s)->s_qf_names[i]);	    REISERFS_SB(s)->s_qf_names[i] = NULL;	}#endif    return -EINVAL;  }    handle_attrs(s);  /* Add options that are safe here */  safe_mask |= 1 << REISERFS_SMALLTAIL;  safe_mask |= 1 << REISERFS_LARGETAIL;  safe_mask |= 1 << REISERFS_NO_BORDER;  safe_mask |= 1 << REISERFS_NO_UNHASHED_RELOCATION;  safe_mask |= 1 << REISERFS_HASHED_RELOCATION;  safe_mask |= 1 << REISERFS_TEST4;  safe_mask |= 1 << REISERFS_ATTRS;  safe_mask |= 1 << REISERFS_XATTRS_USER;  safe_mask |= 1 << REISERFS_POSIXACL;  safe_mask |= 1 << REISERFS_BARRIER_FLUSH;  safe_mask |= 1 << REISERFS_BARRIER_NONE;  safe_mask |= 1 << REISERFS_ERROR_RO;  safe_mask |= 1 << REISERFS_ERROR_CONTINUE;  safe_mask |= 1 << REISERFS_ERROR_PANIC;  /* Update the bitmask, taking care to keep   * the bits we're not allowed to change here */  REISERFS_SB(s)->s_mount_opt = (REISERFS_SB(s)->s_mount_opt & ~safe_mask) |  (mount_options & safe_mask);  if(commit_max_age != 0 && commit_max_age != (unsigned int)-1) {    journal->j_max_commit_age = commit_max_age;    journal->j_max_trans_age = commit_max_age;  }  else if(commit_max_age == 0)  {    /* 0 means restore defaults. */    journal->j_max_commit_age = journal->j_default_max_commit_age;    journal->j_max_trans_age = JOURNAL_MAX_TRANS_AGE;  }  if(blocks) {    int rc = reiserfs_resize(s, blocks);    if (rc != 0)      return rc;  }  if (*mount_flags & MS_RDONLY) {    reiserfs_xattr_init (s, *mount_flags);    /* remount read-only */    if (s->s_flags & MS_RDONLY)      /* it is read-only already */      return 0;    /* try to remount file system with read-only permissions */    if (sb_umount_state(rs) == REISERFS_VALID_FS || REISERFS_SB(s)->s_mount_state != REISERFS_VALID_FS) {      return 0;    }    err = journal_begin(&th, s, 10) ;    if (err)        return err;    /* Mounting a rw partition read-only. */    reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1) ;    set_sb_umount_state( rs, REISERFS_SB(s)->s_mount_state );    journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));  } else {    /* remount read-write */    if (!(s->s_flags & MS_RDONLY)) {	reiserfs_xattr_init (s, *mount_flags);	return 0; /* We are read-write already */    }    if (reiserfs_is_journal_aborted (journal))	return journal->j_errno;    handle_data_mode(s, mount_options);    handle_barrier_mode(s, mount_options);    REISERFS_SB(s)->s_mount_state = sb_umount_state(rs) ;    s->s_flags &= ~MS_RDONLY ; /* now it is safe to call journal_begin */    err = journal_begin(&th, s, 10) ;    if (err)	return err;        /* Mount a partition which is read-only, read-write */    reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1) ;    REISERFS_SB(s)->s_mount_state = sb_umount_state(rs);    s->s_flags &= ~MS_RDONLY;    set_sb_umount_state( rs, REISERFS_ERROR_FS );    /* mark_buffer_dirty (SB_BUFFER_WITH_SB (s), 1); */    journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));    REISERFS_SB(s)->s_mount_state = REISERFS_VALID_FS ;  }  /* this will force a full flush of all journal lists */  SB_JOURNAL(s)->j_must_wait = 1 ;  err = journal_end(&th, s, 10) ;  if (err)    return err;  s->s_dirt = 0;  if (!( *mount_flags & MS_RDONLY ) ) {    finish_unfinished( s );    reiserfs_xattr_init (s, *mount_flags);  }  return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/556a2a45bce1740f035befaa7201e4ad836c7257/super.c/buggy/fs/reiserfs/super.c