Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1855
b: refs/heads/master
c: 39ca6d4
h: refs/heads/master
i:
  1853: 3153cbe
  1851: c64e6c3
  1847: 1ec104b
  1839: 4655176
  1823: a6d4211
  1791: 2d308cf
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Jun 6, 2005
1 parent 660d2c2 commit feda4af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 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: d9d29a29669f96903d9950bb881c2a393fd33849
refs/heads/master: 39ca6d49759346d4710c759d443eec8048b27213
7 changes: 2 additions & 5 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,8 @@ static inline int __do_follow_link(struct path *path, struct nameidata *nd)
touch_atime(nd->mnt, dentry);
nd_set_link(nd, NULL);

mntget(path->mnt);
if (path->mnt == nd->mnt)
mntget(path->mnt);
error = dentry->d_inode->i_op->follow_link(dentry, nd);
if (!error) {
char *s = nd_get_link(nd);
Expand Down Expand Up @@ -543,8 +544,6 @@ static inline int do_follow_link(struct path *path, struct nameidata *nd)
current->link_count++;
current->total_link_count++;
nd->depth++;
if (path->mnt != nd->mnt)
mntput(path->mnt);
err = __do_follow_link(path, nd);
current->link_count--;
nd->depth--;
Expand Down Expand Up @@ -1550,8 +1549,6 @@ int open_namei(const char * pathname, int flag, int mode, struct nameidata *nd)
error = security_inode_follow_link(path.dentry, nd);
if (error)
goto exit_dput;
if (nd->mnt != path.mnt)
mntput(path.mnt);
error = __do_follow_link(&path, nd);
if (error)
return error;
Expand Down

0 comments on commit feda4af

Please sign in to comment.