Whamcloud - gitweb
merge b_devel into HEAD, which will become 0.7.3
[fs/lustre-release.git] / lustre / kernel_patches / patches / extN-iget-debug.patch
1 --- linux/fs/ext3/namei.c.orig  Thu Jan 30 01:15:13 2003
2 +++ linux/fs/ext3/namei.c       Sat Feb  1 00:33:46 2003
3 @@ -710,6 +710,24 @@
4         return ret;
5  }
6  
7 +static int ext3_find_inode(struct inode *inode, unsigned long ino,
8 +                          void *opaque)
9 +{
10 +       const char *name = NULL;
11 +       int len = 0;
12 +
13 +       if (opaque) {
14 +               struct dentry *dentry = opaque;
15 +               name = dentry->d_name.name;
16 +               len = dentry->d_name.len;
17 +       }
18 +       printk(KERN_INFO "finding inode %s:%lu (%p) count %d (%p = %*s)\n",
19 +              kdevname(inode->i_dev), ino, inode, atomic_read(&inode->i_count),
20 +              opaque, len, name ? name : "");
21 +
22 +       return 1;
23 +}
24 +
25  static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry)
26  {
27         struct inode * inode;
28 @@ -724,8 +742,8 @@
29         if (bh) {
30                 unsigned long ino = le32_to_cpu(de->inode);
31                 brelse (bh);
32 -               inode = iget(dir->i_sb, ino);
33 +               inode = iget4(dir->i_sb, ino, ext3_find_inode, dentry);
34  
35                 if (!inode)
36                         return ERR_PTR(-EACCES);
37 --- linux/fs/ext3/inode.c.orig  Thu Jan 30 01:15:13 2003
38 +++ linux/fs/ext3/inode.c       Sat Feb  1 00:34:45 2003
39 @@ -166,6 +166,9 @@
40   */
41  void ext3_put_inode (struct inode * inode)
42  {
43 +       printk(KERN_INFO "putting inode %s:%lu (%p) count %d\n",
44 +              kdevname(inode->i_dev), inode->i_ino, inode,
45 +              atomic_read(&inode->i_count));
46         ext3_discard_prealloc (inode);
47  }
48