Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / link_notlast-susefix.patch
1 --- linux-2.6.5-7.141/fs/namei.c.orig   2005-04-01 18:03:37.788262784 +0300
2 +++ linux-2.6.5-7.141/fs/namei.c        2005-04-01 18:05:43.058218856 +0300
3 @@ -719,10 +719,12 @@
4                         goto out_dput;
5  
6                 if (inode->i_op->follow_link) {
7 +                       int save_flags = nd->flags;
8                         mntget(next.mnt);
9                         nd->flags |= LOOKUP_LINK_NOTLAST;
10                         err = do_follow_link(next.dentry, nd);
11 -                       nd->flags &= ~LOOKUP_LINK_NOTLAST;
12 +                       if (!(save_flags & LOOKUP_LINK_NOTLAST))
13 +                               nd->flags &= ~LOOKUP_LINK_NOTLAST;
14                         dput(next.dentry);
15                         mntput(next.mnt);
16                         if (err)