Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263687
b: refs/heads/master
c: 0ec26fd
h: refs/heads/master
i:
  263685: 1e27e07
  263683: b199805
  263679: 9b318b9
v: v3
  • Loading branch information
Miklos Szeredi authored and Linus Torvalds committed Sep 9, 2011
1 parent f79f361 commit 1f6573d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 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: e4e436e0bd480668834fe6849a52c5397b7be4fb
refs/heads/master: 0ec26fd0698285b31248e34bf1abb022c00f23d6
33 changes: 15 additions & 18 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,25 +727,22 @@ static int follow_automount(struct path *path, unsigned flags,
if ((flags & LOOKUP_NO_AUTOMOUNT) && !(flags & LOOKUP_PARENT))
return -EISDIR; /* we actually want to stop here */

/*
* We don't want to mount if someone's just doing a stat and they've
* set AT_SYMLINK_NOFOLLOW - unless they're stat'ing a directory and
* appended a '/' to the name.
/* We don't want to mount if someone's just doing a stat -
* unless they're stat'ing a directory and appended a '/' to
* the name.
*
* We do, however, want to mount if someone wants to open or
* create a file of any type under the mountpoint, wants to
* traverse through the mountpoint or wants to open the
* mounted directory. Also, autofs may mark negative dentries
* as being automount points. These will need the attentions
* of the daemon to instantiate them before they can be used.
*/
if (!(flags & LOOKUP_FOLLOW)) {
/* We do, however, want to mount if someone wants to open or
* create a file of any type under the mountpoint, wants to
* traverse through the mountpoint or wants to open the mounted
* directory.
* Also, autofs may mark negative dentries as being automount
* points. These will need the attentions of the daemon to
* instantiate them before they can be used.
*/
if (!(flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY |
LOOKUP_OPEN | LOOKUP_CREATE)) &&
path->dentry->d_inode)
return -EISDIR;
}
if (!(flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY |
LOOKUP_OPEN | LOOKUP_CREATE)) &&
path->dentry->d_inode)
return -EISDIR;

current->total_link_count++;
if (current->total_link_count >= 40)
return -ELOOP;
Expand Down

0 comments on commit 1f6573d

Please sign in to comment.