diff options
-rw-r--r-- | fs/namei.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/namei.c b/fs/namei.c index 5b9016006913..5ea7330c184b 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1646,7 +1646,7 @@ exit: | |||
1646 | } | 1646 | } |
1647 | 1647 | ||
1648 | static struct file *do_last(struct nameidata *nd, struct path *path, | 1648 | static struct file *do_last(struct nameidata *nd, struct path *path, |
1649 | int open_flag, int flag, int acc_mode, | 1649 | int open_flag, int acc_mode, |
1650 | int mode, const char *pathname, | 1650 | int mode, const char *pathname, |
1651 | int *is_link) | 1651 | int *is_link) |
1652 | { | 1652 | { |
@@ -1712,12 +1712,12 @@ static struct file *do_last(struct nameidata *nd, struct path *path, | |||
1712 | audit_inode(pathname, path->dentry); | 1712 | audit_inode(pathname, path->dentry); |
1713 | 1713 | ||
1714 | error = -EEXIST; | 1714 | error = -EEXIST; |
1715 | if (flag & O_EXCL) | 1715 | if (open_flag & O_EXCL) |
1716 | goto exit_dput; | 1716 | goto exit_dput; |
1717 | 1717 | ||
1718 | if (__follow_mount(path)) { | 1718 | if (__follow_mount(path)) { |
1719 | error = -ELOOP; | 1719 | error = -ELOOP; |
1720 | if (flag & O_NOFOLLOW) | 1720 | if (open_flag & O_NOFOLLOW) |
1721 | goto exit_dput; | 1721 | goto exit_dput; |
1722 | } | 1722 | } |
1723 | 1723 | ||
@@ -1845,7 +1845,7 @@ reval: | |||
1845 | nd.flags |= LOOKUP_CREATE | LOOKUP_OPEN; | 1845 | nd.flags |= LOOKUP_CREATE | LOOKUP_OPEN; |
1846 | if (flag & O_EXCL) | 1846 | if (flag & O_EXCL) |
1847 | nd.flags |= LOOKUP_EXCL; | 1847 | nd.flags |= LOOKUP_EXCL; |
1848 | filp = do_last(&nd, &path, open_flag, flag, acc_mode, mode, | 1848 | filp = do_last(&nd, &path, open_flag, acc_mode, mode, |
1849 | pathname, &is_link); | 1849 | pathname, &is_link); |
1850 | if (is_link) | 1850 | if (is_link) |
1851 | goto do_link; | 1851 | goto do_link; |
@@ -1907,7 +1907,7 @@ do_link: | |||
1907 | nd.flags &= ~LOOKUP_PARENT; | 1907 | nd.flags &= ~LOOKUP_PARENT; |
1908 | if (nd.last_type == LAST_BIND) | 1908 | if (nd.last_type == LAST_BIND) |
1909 | goto ok; | 1909 | goto ok; |
1910 | filp = do_last(&nd, &path, open_flag, flag, acc_mode, mode, | 1910 | filp = do_last(&nd, &path, open_flag, acc_mode, mode, |
1911 | pathname, &is_link); | 1911 | pathname, &is_link); |
1912 | if (nd.last_type == LAST_NORM) | 1912 | if (nd.last_type == LAST_NORM) |
1913 | __putname(nd.last.name); | 1913 | __putname(nd.last.name); |