patch-2.4.4 linux/fs/reiserfs/inode.c
Next file: linux/fs/reiserfs/journal.c
Previous file: linux/fs/reiserfs/fix_node.c
Back to the patch index
Back to the overall index
- Lines: 52
- Date:
Fri Apr 27 14:18:08 2001
- Orig file:
v2.4.3/linux/fs/reiserfs/inode.c
- Orig date:
Mon Mar 26 10:54:03 2001
diff -u --recursive --new-file v2.4.3/linux/fs/reiserfs/inode.c linux/fs/reiserfs/inode.c
@@ -374,9 +374,11 @@
** sure we need to. But, this means the item might move if
** kmap schedules
*/
- p = (char *)kmap(bh_result->b_page) ;
- if (fs_changed (fs_gen, inode->i_sb) && item_moved (&tmp_ih, &path)) {
- goto research;
+ if (!p) {
+ p = (char *)kmap(bh_result->b_page) ;
+ if (fs_changed (fs_gen, inode->i_sb) && item_moved (&tmp_ih, &path)) {
+ goto research;
+ }
}
p += offset ;
memset (p, 0, inode->i_sb->s_blocksize);
@@ -420,14 +422,15 @@
ih = get_ih (&path);
} while (1);
+ flush_dcache_page(bh_result->b_page) ;
+ kunmap(bh_result->b_page) ;
+
finished:
pathrelse (&path);
bh_result->b_blocknr = 0 ;
bh_result->b_dev = inode->i_dev;
mark_buffer_uptodate (bh_result, 1);
bh_result->b_state |= (1UL << BH_Mapped);
- flush_dcache_page(bh_result->b_page) ;
- kunmap(bh_result->b_page) ;
return 0;
}
@@ -1182,11 +1185,17 @@
if (!inode)
return inode ;
- // if (comp_short_keys (INODE_PKEY (inode), key)) {
if (is_bad_inode (inode)) {
reiserfs_warning ("vs-13048: reiserfs_iget: "
"bad_inode. Stat data of (%lu %lu) not found\n",
key->on_disk_key.k_dir_id, key->on_disk_key.k_objectid);
+ iput (inode);
+ inode = 0;
+ } else if (comp_short_keys (INODE_PKEY (inode), key)) {
+ reiserfs_warning ("vs-13049: reiserfs_iget: "
+ "Looking for (%lu %lu), found inode of (%lu %lu)\n",
+ key->on_disk_key.k_dir_id, key->on_disk_key.k_objectid,
+ INODE_PKEY (inode)->k_dir_id, INODE_PKEY (inode)->k_objectid);
iput (inode);
inode = 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)