aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 18ea0606145e..3d08478d3130 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1526,14 +1526,11 @@ do_link:
1526 if (error) 1526 if (error)
1527 goto exit_dput; 1527 goto exit_dput;
1528 error = __do_follow_link(&path, nd); 1528 error = __do_follow_link(&path, nd);
1529 path.mnt = nd->mnt;
1530 if (error) 1529 if (error)
1531 return error; 1530 return error;
1532 nd->flags &= ~LOOKUP_PARENT; 1531 nd->flags &= ~LOOKUP_PARENT;
1533 if (nd->last_type == LAST_BIND) { 1532 if (nd->last_type == LAST_BIND)
1534 path.dentry = nd->dentry;
1535 goto ok; 1533 goto ok;
1536 }
1537 error = -EISDIR; 1534 error = -EISDIR;
1538 if (nd->last_type != LAST_NORM) 1535 if (nd->last_type != LAST_NORM)
1539 goto exit; 1536 goto exit;
@@ -1549,6 +1546,7 @@ do_link:
1549 dir = nd->dentry; 1546 dir = nd->dentry;
1550 down(&dir->d_inode->i_sem); 1547 down(&dir->d_inode->i_sem);
1551 path.dentry = __lookup_hash(&nd->last, nd->dentry, nd); 1548 path.dentry = __lookup_hash(&nd->last, nd->dentry, nd);
1549 path.mnt = nd->mnt;
1552 putname(nd->last.name); 1550 putname(nd->last.name);
1553 goto do_last; 1551 goto do_last;
1554} 1552}