Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234937
b: refs/heads/master
c: 0e79458
h: refs/heads/master
i:
  234935: 02b0218
v: v3
  • Loading branch information
Al Viro committed Mar 16, 2011
1 parent f28fea3 commit f024ede
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d10902812c9cd5583130a4ebb9ad19c60b68149d
refs/heads/master: 0e794589e588a88d34e339feee50c72606fb21a7
7 changes: 3 additions & 4 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,9 +753,11 @@ follow_link(struct path *link, struct nameidata *nd, void **p)

BUG_ON(nd->flags & LOOKUP_RCU);

if (link->mnt == nd->path.mnt)
mntget(link->mnt);

if (unlikely(current->total_link_count >= 40)) {
*p = ERR_PTR(-ELOOP); /* no ->put_link(), please */
path_put_conditional(link, nd);
path_put(&nd->path);
return -ELOOP;
}
Expand All @@ -765,9 +767,6 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
touch_atime(link->mnt, dentry);
nd_set_link(nd, NULL);

if (link->mnt == nd->path.mnt)
mntget(link->mnt);

error = security_inode_follow_link(link->dentry, nd);
if (error) {
*p = ERR_PTR(error); /* no ->put_link(), please */
Expand Down

0 comments on commit f024ede

Please sign in to comment.