kernels/linux-2.4.0/fs/jffs/intrep.c
/* A new node (with data) has been added to the file and now the range
   list has to be modified.  */
A new node (with data) has been added to the file and now the range
list has to be modified.
A new node ( with data ) has been added to the file and now the range list has to be modified .
static int
jffs_update_file(struct jffs_file *f, struct jffs_node *node)
{
	int err;
	D3(printk("jffs_update_file(): ino: %u, version: %u\n",
		  f->ino, node->version));
	if (node->data_size == 0) {
		if (node->removed_size == 0) {
		}
		else {
			if ((err = jffs_delete_data(f, node)) < 0) {
				return err;
			}
		}
	}
	else {
		if ((err = jffs_delete_data(f, node)) < 0) {
			return err;
		}
		if ((err = jffs_insert_data(f, node)) < 0) {
			return err;
		}
	}
	return 0;
}
static int jffs_update_file ( struct jffs_file * f , struct jffs_node * node ) { int err ; D3 ( printk ( " \n " , f -> ino , node -> version ) ) ; if ( node -> data_size == 0 ) { if ( node -> removed_size == 0 ) { } else { if ( ( err = jffs_delete_data ( f , node ) ) < 0 ) { return err ; } } } else { if ( ( err = jffs_delete_data ( f , node ) ) < 0 ) { return err ; } if ( ( err = jffs_insert_data ( f , node ) ) < 0 ) { return err ; } } return 0 ; }
A new node (with data) has been added to the file and now the range
list has to be modified.
A new node ( with data ) has been added to the file and now the range list has to be modified .
/* data_offset == X  */ /* data_size == 0  */ /* remove_size == 0  */ /* data_offset == X  */ /* data_size == 0  */ /* remove_size != 0  */ /* data_offset == X  */ /* data_size != 0  */ /* remove_size == Y  */