diff options
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/namei.c b/fs/namei.c index f4788365ea22..0b3138de2a3b 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -721,12 +721,6 @@ static int follow_automount(struct path *path, unsigned flags, | |||
721 | if (!path->dentry->d_op || !path->dentry->d_op->d_automount) | 721 | if (!path->dentry->d_op || !path->dentry->d_op->d_automount) |
722 | return -EREMOTE; | 722 | return -EREMOTE; |
723 | 723 | ||
724 | /* We don't want to mount if someone supplied AT_NO_AUTOMOUNT | ||
725 | * and this is the terminal part of the path. | ||
726 | */ | ||
727 | if ((flags & LOOKUP_NO_AUTOMOUNT) && !(flags & LOOKUP_PARENT)) | ||
728 | return -EISDIR; /* we actually want to stop here */ | ||
729 | |||
730 | /* We don't want to mount if someone's just doing a stat - | 724 | /* We don't want to mount if someone's just doing a stat - |
731 | * unless they're stat'ing a directory and appended a '/' to | 725 | * unless they're stat'ing a directory and appended a '/' to |
732 | * the name. | 726 | * the name. |
@@ -739,7 +733,7 @@ static int follow_automount(struct path *path, unsigned flags, | |||
739 | * of the daemon to instantiate them before they can be used. | 733 | * of the daemon to instantiate them before they can be used. |
740 | */ | 734 | */ |
741 | if (!(flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY | | 735 | if (!(flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY | |
742 | LOOKUP_OPEN | LOOKUP_CREATE)) && | 736 | LOOKUP_OPEN | LOOKUP_CREATE | LOOKUP_AUTOMOUNT)) && |
743 | path->dentry->d_inode) | 737 | path->dentry->d_inode) |
744 | return -EISDIR; | 738 | return -EISDIR; |
745 | 739 | ||