max_cpu_key.on_disk_key = MAX_IN_CORE_KEY; 
max_cpu_key.on_disk_key.k_dir_id = ~0U; max_cpu_key.on_disk_key.k_objectid = ~0U; set_cpu_key_k_offset (&max_cpu_key, ~0U); 
static int finish_unfinished (struct super_block * s){    INITIALIZE_PATH (path);    struct cpu_key max_cpu_key, obj_key;    struct reiserfs_key save_link_key;    int retval = 0;    struct item_head * ih;    struct buffer_head * bh;    int item_pos;    char * item;    int done;    struct inode * inode;    int truncate;#ifdef CONFIG_QUOTA    int i;    int ms_active_set;#endif      /* compose key to look for "save" links */    max_cpu_key.version = KEY_FORMAT_3_5;    max_cpu_key.on_disk_key = MAX_IN_CORE_KEY;    max_cpu_key.key_length = 3;#ifdef CONFIG_QUOTA    /* Needed for iput() to work correctly and not trash data */    if (s->s_flags & MS_ACTIVE) {	    ms_active_set = 0;    } else {	    ms_active_set = 1;	    s->s_flags |= MS_ACTIVE;    }    /* Turn on quotas so that they are updated correctly */    for (i = 0; i < MAXQUOTAS; i++) {	if (REISERFS_SB(s)->s_qf_names[i]) {	    int ret = reiserfs_quota_on_mount(s, i);	    if (ret < 0)		reiserfs_warning(s, "reiserfs: cannot turn on journalled quota: error %d", ret);	}    }#endif     done = 0;    REISERFS_SB(s)->s_is_unlinked_ok = 1;    while (!retval) {        retval = search_item (s, &max_cpu_key, &path);        if (retval != ITEM_NOT_FOUND) {            reiserfs_warning (s, "vs-2140: finish_unfinished: search_by_key returned %d",                              retval);            break;        }                bh = get_last_bh (&path);        item_pos = get_item_pos (&path);        if (item_pos != B_NR_ITEMS (bh)) {            reiserfs_warning (s, "vs-2060: finish_unfinished: wrong position found");            break;        }        item_pos --;        ih = B_N_PITEM_HEAD (bh, item_pos);         if (le32_to_cpu (ih->ih_key.k_dir_id) != MAX_KEY_OBJECTID)            /* there are no "save" links anymore */            break;         save_link_key = ih->ih_key;        if (is_indirect_le_ih (ih))            truncate = 1;        else            truncate = 0;         /* reiserfs_iget needs k_dirid and k_objectid only */        item = B_I_PITEM (bh, ih);        obj_key.on_disk_key.k_dir_id = le32_to_cpu (*(__le32 *)item);        obj_key.on_disk_key.k_objectid = le32_to_cpu (ih->ih_key.k_objectid);	obj_key.on_disk_key.k_offset = 0;	obj_key.on_disk_key.k_type = 0;	        pathrelse (&path);         inode = reiserfs_iget (s, &obj_key);        if (!inode) {            /* the unlink almost completed, it just did not manage to remove	       "save" link and release objectid */            reiserfs_warning (s, "vs-2180: finish_unfinished: iget failed for %K",                              &obj_key);            retval = remove_save_link_only (s, &save_link_key, 1);            continue;        }	if (!truncate && inode->i_nlink) {	    /* file is not unlinked */            reiserfs_warning (s, "vs-2185: finish_unfinished: file %K is not unlinked",                              &obj_key);            retval = remove_save_link_only (s, &save_link_key, 0);            continue;	}	DQUOT_INIT(inode);	if (truncate && S_ISDIR (inode->i_mode) ) {	    /* We got a truncate request for a dir which is impossible.	       The only imaginable way is to execute unfinished truncate request	       then boot into old kernel, remove the file and create dir with	       the same key. */	    reiserfs_warning(s, "green-2101: impossible truncate on a directory %k. Please report", INODE_PKEY (inode));	    retval = remove_save_link_only (s, &save_link_key, 0);	    truncate = 0;	    iput (inode); 	    continue;	}         if (truncate) {            REISERFS_I(inode) -> i_flags |= i_link_saved_truncate_mask;            /* not completed truncate found. New size was committed together	       with "save" link */            reiserfs_info (s, "Truncating %k to %Ld ..",                              INODE_PKEY (inode), inode->i_size);            reiserfs_truncate_file (inode, 0/*don't update modification time*/);            retval = remove_save_link (inode, truncate);        } else {            REISERFS_I(inode) -> i_flags |= i_link_saved_unlink_mask;            /* not completed unlink (rmdir) found */            reiserfs_info (s, "Removing %k..", INODE_PKEY (inode));            /* removal gets completed in iput */            retval = 0;        }         iput (inode);        printk ("done\n");        done ++;    }    REISERFS_SB(s)->s_is_unlinked_ok = 0;     #ifdef CONFIG_QUOTA    /* Turn quotas off */    for (i = 0; i < MAXQUOTAS; i++) {            if (sb_dqopt(s)->files[i])                    vfs_quota_off_mount(s, i);    }    if (ms_active_set)	    /* Restore the flag back */	    s->s_flags &= ~MS_ACTIVE;#endif    pathrelse (&path);    if (done)        reiserfs_info (s, "There were %d uncompleted unlinks/truncates. "                          "Completed\n", done);    return retval;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/f359b74c80bc76c1f6c2cb8f2837882f2335ba0c/super.c/clean/fs/reiserfs/super.c