* of the owner of the directory and of the owner of the parent directory */ jbegin_count = JOURNAL_PER_BALANCE_CNT * 2 + 2 + 2 * (REISERFS_QUOTA_INIT_BLOCKS+REISERFS_QUOTA_TRANS_BLOCKS); 
* of the owner of the directory and of the owner of the parent directory. * The quota structure is possibly deleted only on last iput => outside * of this transaction */ jbegin_count = JOURNAL_PER_BALANCE_CNT * 2 + 2 + 4 * REISERFS_QUOTA_TRANS_BLOCKS(dir->i_sb); 
static int reiserfs_rmdir (struct inode * dir, struct dentry *dentry){    int retval, err;    struct inode * inode;    struct reiserfs_transaction_handle th ;    int jbegin_count;     INITIALIZE_PATH (path);    struct reiserfs_dir_entry de;    /* we will be doing 2 balancings and update 2 stat data, we change quotas     * of the owner of the directory and of the owner of the parent directory */    jbegin_count = JOURNAL_PER_BALANCE_CNT * 2 + 2 + 2 * (REISERFS_QUOTA_INIT_BLOCKS+REISERFS_QUOTA_TRANS_BLOCKS);    reiserfs_write_lock(dir->i_sb);    retval = journal_begin(&th, dir->i_sb, jbegin_count) ;    if (retval)        goto out_rmdir;    de.de_gen_number_bit_string = NULL;    if ( (retval = reiserfs_find_entry (dir, dentry->d_name.name, dentry->d_name.len, &path, &de)) == NAME_NOT_FOUND) {	retval = -ENOENT;	goto end_rmdir;    } else if ( retval == IO_ERROR) {	retval = -EIO;	goto end_rmdir;    }    inode = dentry->d_inode;    reiserfs_update_inode_transaction(inode) ;    reiserfs_update_inode_transaction(dir) ;    if (de.de_objectid != inode->i_ino) {	// FIXME: compare key of an object and a key found in the	// entry	retval = -EIO;	goto end_rmdir;    }    if (!reiserfs_empty_dir(inode)) {	retval = -ENOTEMPTY;	goto end_rmdir;    }    /* cut entry from dir directory */    retval = reiserfs_cut_from_item (&th, &path, &(de.de_entry_key), dir,                                      NULL, /* page */ 				     0/*new file size - not used here*/);    if (retval < 0)	goto end_rmdir;    if ( inode->i_nlink != 2 && inode->i_nlink != 1 )	reiserfs_warning (inode->i_sb, "%s: empty directory has nlink "			  "!= 2 (%d)", __FUNCTION__, inode->i_nlink);    inode->i_nlink = 0;    inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;    reiserfs_update_sd (&th, inode);    DEC_DIR_INODE_NLINK(dir)    dir->i_size -= (DEH_SIZE + de.de_entrylen);    reiserfs_update_sd (&th, dir);    /* prevent empty directory from getting lost */    add_save_link (&th, inode, 0/* not truncate */);    retval = journal_end(&th, dir->i_sb, jbegin_count) ;    reiserfs_check_path(&path) ;out_rmdir:    reiserfs_write_unlock(dir->i_sb);    return retval;	 end_rmdir:    /* we must release path, because we did not call       reiserfs_cut_from_item, or reiserfs_cut_from_item does not       release path if operation was not complete */    pathrelse (&path);    err = journal_end(&th, dir->i_sb, jbegin_count) ;    reiserfs_write_unlock(dir->i_sb);    return err ? err : retval;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/556a2a45bce1740f035befaa7201e4ad836c7257/namei.c/clean/fs/reiserfs/namei.c