diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-12-24 07:15:41 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-03-05 09:01:29 -0500 |
commit | 4296e2cbf2138b5831b83f03e81de916ce1a967d (patch) | |
tree | 395b8422f7555c79c0251be27cff715adf9ec11e | |
parent | 5b369df8263fe7ab4dac2bb08b8f423dc5e33752 (diff) |
Leave mangled flag only for setting nd.intent.open.flag
Nothing else uses it anymore
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/namei.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/namei.c b/fs/namei.c index 5ea7330c184b..f5e4397dcd7e 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1777,18 +1777,18 @@ struct file *do_filp_open(int dfd, const char *pathname, | |||
1777 | acc_mode = MAY_OPEN | ACC_MODE(open_flag); | 1777 | acc_mode = MAY_OPEN | ACC_MODE(open_flag); |
1778 | 1778 | ||
1779 | /* O_TRUNC implies we need access checks for write permissions */ | 1779 | /* O_TRUNC implies we need access checks for write permissions */ |
1780 | if (flag & O_TRUNC) | 1780 | if (open_flag & O_TRUNC) |
1781 | acc_mode |= MAY_WRITE; | 1781 | acc_mode |= MAY_WRITE; |
1782 | 1782 | ||
1783 | /* Allow the LSM permission hook to distinguish append | 1783 | /* Allow the LSM permission hook to distinguish append |
1784 | access from general write access. */ | 1784 | access from general write access. */ |
1785 | if (flag & O_APPEND) | 1785 | if (open_flag & O_APPEND) |
1786 | acc_mode |= MAY_APPEND; | 1786 | acc_mode |= MAY_APPEND; |
1787 | 1787 | ||
1788 | /* | 1788 | /* |
1789 | * The simplest case - just a plain lookup. | 1789 | * The simplest case - just a plain lookup. |
1790 | */ | 1790 | */ |
1791 | if (!(flag & O_CREAT)) { | 1791 | if (!(open_flag & O_CREAT)) { |
1792 | filp = get_empty_filp(); | 1792 | filp = get_empty_filp(); |
1793 | 1793 | ||
1794 | if (filp == NULL) | 1794 | if (filp == NULL) |
@@ -1798,7 +1798,7 @@ struct file *do_filp_open(int dfd, const char *pathname, | |||
1798 | nd.intent.open.flags = flag; | 1798 | nd.intent.open.flags = flag; |
1799 | nd.intent.open.create_mode = 0; | 1799 | nd.intent.open.create_mode = 0; |
1800 | error = do_path_lookup(dfd, pathname, | 1800 | error = do_path_lookup(dfd, pathname, |
1801 | lookup_flags(flag)|LOOKUP_OPEN, &nd); | 1801 | lookup_flags(open_flag)|LOOKUP_OPEN, &nd); |
1802 | if (IS_ERR(nd.intent.open.file)) { | 1802 | if (IS_ERR(nd.intent.open.file)) { |
1803 | if (error == 0) { | 1803 | if (error == 0) { |
1804 | error = PTR_ERR(nd.intent.open.file); | 1804 | error = PTR_ERR(nd.intent.open.file); |
@@ -1843,7 +1843,7 @@ reval: | |||
1843 | nd.intent.open.create_mode = mode; | 1843 | nd.intent.open.create_mode = mode; |
1844 | nd.flags &= ~LOOKUP_PARENT; | 1844 | nd.flags &= ~LOOKUP_PARENT; |
1845 | nd.flags |= LOOKUP_CREATE | LOOKUP_OPEN; | 1845 | nd.flags |= LOOKUP_CREATE | LOOKUP_OPEN; |
1846 | if (flag & O_EXCL) | 1846 | if (open_flag & O_EXCL) |
1847 | nd.flags |= LOOKUP_EXCL; | 1847 | nd.flags |= LOOKUP_EXCL; |
1848 | filp = do_last(&nd, &path, open_flag, acc_mode, mode, | 1848 | filp = do_last(&nd, &path, open_flag, acc_mode, mode, |
1849 | pathname, &is_link); | 1849 | pathname, &is_link); |
@@ -1872,7 +1872,7 @@ exit_parent: | |||
1872 | 1872 | ||
1873 | do_link: | 1873 | do_link: |
1874 | error = -ELOOP; | 1874 | error = -ELOOP; |
1875 | if ((flag & O_NOFOLLOW) || count++ == 32) | 1875 | if ((open_flag & O_NOFOLLOW) || count++ == 32) |
1876 | goto exit_dput; | 1876 | goto exit_dput; |
1877 | /* | 1877 | /* |
1878 | * This is subtle. Instead of calling do_follow_link() we do the | 1878 | * This is subtle. Instead of calling do_follow_link() we do the |