Whamcloud - gitweb
b=7049
[fs/lustre-release.git] / lustre / kernel_patches / patches / vfs_lookup_in_file-2.6.patch
1 --- linux-2.6.7.orig/fs/namei.c 2005-04-01 11:14:26.000000000 +0300
2 +++ linux-2.6.7/fs/namei.c      2005-04-01 11:23:01.748305104 +0300
3 @@ -762,6 +762,13 @@ last_component:
4                                 inode = nd->dentry->d_inode;
5                                 /* fallthrough */
6                         case 1:
7 +                               if (lookup_flags & LOOKUP_DIRECTORY) {
8 +                                       err = -ENOTDIR;
9 +                                       if (!nd->dentry->d_inode->i_op ||
10 +                                           !nd->dentry->d_inode->i_op->lookup) {
11 +                                               goto return_err;
12 +                                       }
13 +                               }
14                                 goto return_reval;
15                 }
16                 if (nd->dentry->d_op && nd->dentry->d_op->d_hash) {